We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4177da commit 8715ee7Copy full SHA for 8715ee7
CMakeLists.txt
@@ -19,10 +19,15 @@ else()
19
message(STATUS "native target not supported")
20
endif()
21
22
-if (NOT CMAKE_BUILD_TYPE)
+if (NOT CMAKE_BUILD_TYPE AND NOT SANITIZE)
23
message(STATUS "No build type selected, default to Release")
24
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
25
26
+if(SANITIZE)
27
+ add_compile_options(-fsanitize=address -fno-omit-frame-pointer -fno-sanitize-recover=all)
28
+ add_compile_definitions(ada PUBLIC ASAN_OPTIONS=detect_leaks=1)
29
+ link_libraries(-fsanitize=address -fno-omit-frame-pointer -fno-sanitize-recover=all)
30
+endif()
31
include(cmake/CPM.cmake)
32
33
add_subdirectory(dependencies)
0 commit comments