From cf64f2baca27005037c3b962f78a519c38a6ab64 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 10 Jun 2019 18:32:10 +0300 Subject: Fixed CMake address sanitizer --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 519233cb..e94a4e5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,7 @@ option(SPDLOG_BUILD_EXAMPLES "Build examples" ON) option(SPDLOG_BUILD_BENCH "Build benchmarks (Requires https://github.com/google/benchmark.git to be installed)" OFF) option(SPDLOG_BUILD_TESTS "Build tests" OFF) option(SPDLOG_BUILD_HO_TESTS "Build tests using the header only version" OFF) +option(SPDLOG_SANITIZE_ADDRESS "Enable address sanitizer in tests" OFF) option(SPDLOG_INSTALL "Generate the install target." ${SPDLOG_MASTER_PROJECT}) option(SPDLOG_FMT_EXTERNAL "Use external fmt library instead of bundled" OFF) @@ -57,7 +58,7 @@ find_package(Threads REQUIRED) #--------------------------------------------------------------------------------------- add_library(spdlog STATIC src/spdlog.cpp ${SPDLOG_ALL_HEADERS}) add_library(spdlog::spdlog ALIAS spdlog) - + target_compile_definitions(spdlog PUBLIC SPDLOG_COMPILED_LIB) target_include_directories(spdlog PUBLIC "$" -- cgit v1.2.3