File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ FetchContent_Declare(
24
24
)
25
25
FetchContent_MakeAvailable(benchmark)
26
26
27
+ set (CMAKE_CONFIGURATION_TYPES Debug Release TSan)
28
+ set (CMAKE_CXX_FLAGS [variant=Debug] "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address,undefined,leak" )
29
+ set (CMAKE_CXX_FLAGS [variant=TSan] "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=thread" )
30
+
27
31
set (CMAKE_CXX_STANDARD 17)
28
32
set (CMAKE_CXX_STANDARD_REQUIRED TRUE )
29
33
set (CMAKE_CXX_EXTENSIONS FALSE )
@@ -33,9 +37,6 @@ set(CMAKE_INSTALL_RPATH $ORIGIN/../lib)
33
37
set (CMAKE_EXPORT_COMPILE_COMMANDS TRUE )
34
38
set (CMAKE_CXX_COMPILER_LAUNCHER ccache)
35
39
36
- set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address,undefined,leak" )
37
- set (CMAKE_CXX_FLAGS_TSAN "${CMAKE_CXX_FLAGS_TSAN} -fsanitize=thread" )
38
-
39
40
add_compile_options (-Wall -Wextra -Wpedantic -Werror)
40
41
add_compile_options (-Wno-error=cpp)
41
42
Original file line number Diff line number Diff line change 4
4
5
5
cmake -G " Ninja Multi-Config" -B build
6
6
7
- # Debug,TSan,Release
8
7
config=${1:- Debug}
9
8
10
9
cmake --build build --config ${config}
You can’t perform that action at this time.
0 commit comments