Skip to content

Commit

Permalink
Only add asan for CXX builds
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbs96 committed Oct 3, 2023
1 parent 1d5d25d commit bb76601
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "DebugSan")
-fsanitize=address,undefined
-O1
)
add_link_options(
add_cxx_link_options(
-fsanitize=address,undefined
)
elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down
3 changes: 3 additions & 0 deletions cmake/phasar_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ endmacro()
macro(add_cxx_compile_definitions defs)
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:${defs}>")
endmacro()
macro(add_cxx_link_options opts)
add_link_options("$<$<COMPILE_LANGUAGE:CXX>:${opts}>")
endmacro()

function(add_phasar_unittest test_name)
message("Set-up unittest: ${test_name}")
Expand Down

0 comments on commit bb76601

Please sign in to comment.