Skip to content

Commit

Permalink
asan
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Mar 16, 2024
1 parent fdee991 commit 759e000
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/develop.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ int main()
endmacro()

# Enable address sanitizer
option(ENABLE_SANITIZER "Enable sanitizer(Debug+Gcc/Clang/AppleClang)" ON)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
option(ENABLE_SANITIZER "Enable sanitizer(Debug+Gcc/Clang/AppleClang)" OFF)
else()
option(ENABLE_SANITIZER "Enable sanitizer(Debug+Gcc/Clang/AppleClang)" ON)
endif()
if(ENABLE_SANITIZER AND NOT MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
check_asan(HAS_ASAN)
Expand Down

0 comments on commit 759e000

Please sign in to comment.