File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ target_include_directories(asyncpp_grpc
36
36
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /include )
37
37
target_compile_features (asyncpp_grpc PUBLIC cxx_std_20 )
38
38
39
+ if (ASYNCPP_WITH_ASAN )
40
+ message (STATUS "Building with asan enabled" )
41
+ target_compile_options (asyncpp_grpc PRIVATE -fsanitize=address )
42
+ target_link_libraries (asyncpp_grpc PRIVATE -fsanitize=address )
43
+ endif ()
44
+
39
45
if (ASYNCPP_BUILD_TEST )
40
46
enable_testing ()
41
47
include (GoogleTest )
@@ -61,9 +67,8 @@ if(ASYNCPP_BUILD_TEST)
61
67
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} /protos/ )
62
68
63
69
if (ASYNCPP_WITH_ASAN )
64
- message (STATUS "Building with asan enabled" )
65
70
target_compile_options (asyncpp_grpc-test PRIVATE -fsanitize=address )
66
- target_link_libraries (asyncpp_grpc-test PRIVATE asan )
71
+ target_link_libraries (asyncpp_grpc-test PRIVATE -fsanitize=address )
67
72
endif ()
68
73
69
74
gtest_discover_tests (asyncpp_grpc-test )
You can’t perform that action at this time.
0 commit comments