diff --git a/CMakeLists.txt b/CMakeLists.txt index d97ca9ae8f..b57c02d845 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +# set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1) # Option to generate code coverage report using llvm-cov and lcov. option(DPCTL_GENERATE_COVERAGE diff --git a/dpctl/CMakeLists.txt b/dpctl/CMakeLists.txt index 6ccca33dd6..487a5782e2 100644 --- a/dpctl/CMakeLists.txt +++ b/dpctl/CMakeLists.txt @@ -13,6 +13,7 @@ if(WIN32) "-Wunused-function " "-Wuninitialized " "-Wmissing-declarations " + "-Wstrict-prototypes " "-Wno-unused-parameter " ) string(CONCAT SDL_FLAGS @@ -36,6 +37,8 @@ elseif(UNIX) "-Wunused-function " "-Wuninitialized " "-Wmissing-declarations " + "-Wstrict-prototypes " + "-Wno-unused-parameter " "-fdiagnostics-color=auto " ) string(CONCAT SDL_FLAGS @@ -46,7 +49,7 @@ elseif(UNIX) "-D_FORTIFY_SOURCE=2 " "-Wformat " "-Wformat-security " - "-fno-strict-overflow " +# "-fno-strict-overflow " # no-strict-overflow is implied by -fwrapv "-fno-delete-null-pointer-checks " "-fwrapv " ) @@ -137,9 +140,11 @@ set(CMAKE_INSTALL_RPATH "$ORIGIN") function(build_dpctl_ext _trgt _src _dest) add_cython_target(${_trgt} ${_src} CXX OUTPUT_VAR _generated_src) + set(_cythonize_trgt "${_trgt}_cythonize_pyx") + add_custom_target(${_cythonize_trgt} DEPENDS ${_src}) add_library(${_trgt} MODULE ${_generated_src}) target_include_directories(${_trgt} PRIVATE ${NumPy_INCLUDE_DIR} ${DPCTL_INCLUDE_DIR}) - add_dependencies(${_trgt} _build_time_create_dpctl_include_copy) + add_dependencies(${_trgt} _build_time_create_dpctl_include_copy ${_cythonize_trgt}) if (DPCTL_GENERATE_COVERAGE) target_compile_definitions(${_trgt} PRIVATE CYTHON_TRACE=1 CYTHON_TRACE_NOGIL=1) target_compile_options(${_trgt} PRIVATE -fno-sycl-use-footer) diff --git a/libsyclinterface/CMakeLists.txt b/libsyclinterface/CMakeLists.txt index 7076fe53c3..79cea3696d 100644 --- a/libsyclinterface/CMakeLists.txt +++ b/libsyclinterface/CMakeLists.txt @@ -110,6 +110,8 @@ if(WIN32) "-Wunused-function " "-Wuninitialized " "-Wmissing-declarations " + "-Wstrict-prototypes " + "-Wno-unused-parameter " ) string(CONCAT SDL_FLAGS "/GS " @@ -131,6 +133,8 @@ elseif(UNIX) "-Wunused-function " "-Wuninitialized " "-Wmissing-declarations " + "-Wstrict-prototypes " + "-Wno-unused-parameter " "-fdiagnostics-color=auto " ) string(CONCAT SDL_FLAGS @@ -141,7 +145,7 @@ elseif(UNIX) "-D_FORTIFY_SOURCE=2 " "-Wformat " "-Wformat-security " - "-fno-strict-overflow " +# "-fno-strict-overflow " # implied by -fwrapv "-fno-delete-null-pointer-checks " "-fwrapv " )