Skip to content

Added -Wstrict-prototypes, removed -fno-strict-overflow #1131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions dpctl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if(WIN32)
"-Wunused-function "
"-Wuninitialized "
"-Wmissing-declarations "
"-Wstrict-prototypes "
"-Wno-unused-parameter "
)
string(CONCAT SDL_FLAGS
Expand All @@ -36,6 +37,8 @@ elseif(UNIX)
"-Wunused-function "
"-Wuninitialized "
"-Wmissing-declarations "
"-Wstrict-prototypes "
"-Wno-unused-parameter "
"-fdiagnostics-color=auto "
)
string(CONCAT SDL_FLAGS
Expand All @@ -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 "
)
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion libsyclinterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ if(WIN32)
"-Wunused-function "
"-Wuninitialized "
"-Wmissing-declarations "
"-Wstrict-prototypes "
"-Wno-unused-parameter "
)
string(CONCAT SDL_FLAGS
"/GS "
Expand All @@ -131,6 +133,8 @@ elseif(UNIX)
"-Wunused-function "
"-Wuninitialized "
"-Wmissing-declarations "
"-Wstrict-prototypes "
"-Wno-unused-parameter "
"-fdiagnostics-color=auto "
)
string(CONCAT SDL_FLAGS
Expand All @@ -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 "
)
Expand Down