Skip to content

Commit

Permalink
[cmake] Fix sanitizer target names
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Aug 21, 2023
1 parent 54d4be9 commit 72029ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions c++/app4triqs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,31 @@ endif()

option(ASAN OFF "Compile library and executables with LLVM Address Sanitizer")
if(ASAN)
if(NOT TARGET ASAN)
if(NOT TARGET asan)
find_package(sanitizer REQUIRED COMPONENTS asan)
endif()
target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:asan>)
endif()

option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior Sanitizer")
if(UBSAN)
if(NOT TARGET UBSAN)
if(NOT TARGET ubsan)
find_package(sanitizer REQUIRED COMPONENTS ubsan)
endif()
target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:ubsan>)
endif()

option(MSAN OFF "Compile library and executables with LLVM Memory Sanitizer")
if(MSAN)
if(NOT TARGET MSAN)
if(NOT TARGET msan)
find_package(sanitizer REQUIRED COMPONENTS msan)
endif()
target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:msan>)
endif()

option(TSAN OFF "Compile library and executables with LLVM Thread Sanitizer")
if(TSAN)
if(NOT TARGET TSAN)
if(NOT TARGET tsan)
find_package(sanitizer REQUIRED COMPONENTS tsan)
endif()
target_link_libraries(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:tsan>)
Expand Down

0 comments on commit 72029ee

Please sign in to comment.