mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
add sanitizers-cmake to enable/disable ASAN
This commit is contained in:
parent
fe8c1c2a59
commit
d8f2d78036
9 changed files with 547 additions and 6 deletions
|
@ -7,12 +7,8 @@ set(PROJECT_NAME
|
|||
project(${PROJECT_NAME})
|
||||
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} -std=c++14 -fsanitize=address -fno-omit-frame-pointer")
|
||||
"${CMAKE_CXX_FLAGS} -std=c++14")
|
||||
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -DLEAK_SANITIZER")
|
||||
|
||||
#
|
||||
|
||||
if (WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -O3")
|
||||
|
@ -57,7 +53,8 @@ find_package(Boost COMPONENTS
|
|||
date_time
|
||||
REQUIRED)
|
||||
|
||||
|
||||
#info https://github.com/arsenm/sanitizers-cmake
|
||||
find_package(Sanitizers)
|
||||
|
||||
if(APPLE)
|
||||
include_directories(/usr/local/opt/openssl/include)
|
||||
|
@ -90,6 +87,8 @@ set(SOURCE_FILES
|
|||
add_executable(${PROJECT_NAME}
|
||||
${SOURCE_FILES})
|
||||
|
||||
add_sanitizers(${PROJECT_NAME})
|
||||
|
||||
create_git_version()
|
||||
|
||||
configure_files(${CMAKE_CURRENT_SOURCE_DIR}/src/templates ${CMAKE_CURRENT_BINARY_DIR}/templates)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue