mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-25 05:50:15 +00:00
Misc. cmake refactoring
This commit is contained in:
parent
773ea19532
commit
7481431551
@ -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_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||||
set(CMAKE_ARCHIVE_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)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
@ -21,7 +21,8 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} RAWCMAKEBUILDTYPE)
|
|||||||
message(STATUS "CMAKE_BUILD_TYPE: " ${RAWCMAKEBUILDTYPE})
|
message(STATUS "CMAKE_BUILD_TYPE: " ${RAWCMAKEBUILDTYPE})
|
||||||
if(RAWCMAKEBUILDTYPE STREQUAL "debug")
|
if(RAWCMAKEBUILDTYPE STREQUAL "debug")
|
||||||
message(STATUS "Adding sanitizer...")
|
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
|
# bug in FindSanitizer.cmake ??? idfk, i'll investigate l8tr
|
||||||
add_compile_options(-fsanitize=address)
|
add_compile_options(-fsanitize=address)
|
||||||
|
@ -55,5 +55,6 @@ function (add_sanitize_address TARGET)
|
|||||||
return()
|
return()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
message(STATUS "Adding ASAN for " ${TARGET} "")
|
||||||
sanitizer_add_flags(${TARGET} "AddressSanitizer" "ASan")
|
sanitizer_add_flags(${TARGET} "AddressSanitizer" "ASan")
|
||||||
endfunction ()
|
endfunction ()
|
||||||
|
Loading…
Reference in New Issue
Block a user