Skip to content

Commit

Permalink
Respond to 0ax1 review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul committed Sep 11, 2023
1 parent c41fd9d commit 8de7971
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions cmake/enable_sdks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,19 @@ if (APPLE)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
target_compile_options(clap-wrapper-compile-options INTERFACE -Wall -Wextra -Wno-unused-parameter -Wpedantic -Werror)
if (${CLAP_WRAPPER_ENABLE_ASAN})
message(STATUS "clap-wrapper: enabling asan build")
target_compile_options(clap-wrapper-sanitizer-options INTERFACE -fsanitize=address -fsanitize=undefined)
target_link_options(clap-wrapper-sanitizer-options INTERFACE -fsanitize=address -fsanitize=undefined)
if (${CLAP_WRAPPER_ENABLE_SANITIZER})
message(STATUS "clap-wrapper: enabling sanitizer build")

target_compile_options(clap-wrapper-sanitizer-options INTERFACE
-fsanitize=address,undefined,float-divide-by-zero
-fsanitize-address-use-after-return=always
-fsanitize-address-use-after-scope
)
target_link_options(clap-wrapper-sanitizer-options INTERFACE
-fsanitize=address,undefined,float-divide-by-zero
-fsanitize-address-use-after-return=always
-fsanitize-address-use-after-scope
)
target_link_libraries(clap-wrapper-compile-options INTERFACE clap-wrapper-sanitizer-options)
endif()
endif()
Expand Down

0 comments on commit 8de7971

Please sign in to comment.