Skip to content

Commit

Permalink
Merge pull request #43 from sparcians/dev/bdutro/fix-stfpy-debug-compile
Browse files Browse the repository at this point in the history
Fix an stfpy compilation error that can occur in debug mode on systems that specify -D_FORTIFY_SOURCE
  • Loading branch information
bdutro authored Aug 8, 2024
2 parents 9bbe657 + 17266f0 commit ea95fa6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stfpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_link_options(-Wno-unused-command-line-argument -Wno-ignored-optimization-argument)
endif()

# Disable _FORTIFY_SOURCE unless we're in Release mode
if (NOT CMAKE_BUILD_TYPE MATCHES "^[Rr]elease")
add_compile_options(-U_FORTIFY_SOURCE -Wp,-U_FORTIFY_SOURCE)
endif()

get_directory_property(include_dirs INCLUDE_DIRECTORIES)
get_directory_property(compile_opts COMPILE_OPTIONS)
get_directory_property(link_opts LINK_OPTIONS)
Expand Down

0 comments on commit ea95fa6

Please sign in to comment.