File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -218,11 +218,15 @@ endif()
218218if (NETGRAPH_CORE_SANITIZE)
219219 message (STATUS "Enabling sanitizers (disables optimizations)" )
220220 if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" )
221- set (SAN_FLAGS " -fsanitize=address,undefined -fno-omit-frame-pointer" )
221+ set (SAN_FLAGS -fsanitize=address,undefined -fno-omit-frame-pointer)
222222 foreach (tgt netgraph_core _netgraph_core)
223223 target_compile_options (${tgt} PRIVATE ${SAN_FLAGS} )
224224 target_link_options (${tgt} PRIVATE ${SAN_FLAGS} )
225225 endforeach ()
226+ if (TARGET netgraph_core_tests)
227+ target_compile_options (netgraph_core_tests PRIVATE ${SAN_FLAGS} )
228+ target_link_options (netgraph_core_tests PRIVATE ${SAN_FLAGS} )
229+ endif ()
226230 else ()
227231 message (WARNING "NETGRAPH_CORE_SANITIZE requires GCC or Clang" )
228232 endif ()
You can’t perform that action at this time.
0 commit comments