diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c280dc..208f509 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake-modules" ${CMAKE_MODULE_PATH}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) -find_package(Sanitizers) +#find_package(Sanitizers) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) @@ -21,7 +21,8 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} RAWCMAKEBUILDTYPE) message(STATUS "CMAKE_BUILD_TYPE: " ${RAWCMAKEBUILDTYPE}) if(RAWCMAKEBUILDTYPE STREQUAL "debug") message(STATUS "Adding sanitizer...") - add_sanitizers(LaikaLib LaikaBot LaikaCNC) + #set(SANITIZE_ADDRESS TRUE) + #add_sanitizers(LaikaLib LaikaBot LaikaCNC) # bug in FindSanitizer.cmake ??? idfk, i'll investigate l8tr add_compile_options(-fsanitize=address) diff --git a/cmake-modules/FindASan.cmake b/cmake-modules/FindASan.cmake index 98ea7cb..8b5301b 100644 --- a/cmake-modules/FindASan.cmake +++ b/cmake-modules/FindASan.cmake @@ -55,5 +55,6 @@ function (add_sanitize_address TARGET) return() endif () + message(STATUS "Adding ASAN for " ${TARGET} "") sanitizer_add_flags(${TARGET} "AddressSanitizer" "ASan") endfunction ()