瀏覽代碼

CIVETWEB_ENABLE_ASAN fixup - needed in two places

Nigel Stewart 8 年之前
父節點
當前提交
4160dc0326
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      CMakeLists.txt

+ 2 - 0
CMakeLists.txt

@@ -352,11 +352,13 @@ if (CIVETWEB_ENABLE_CXX)
   add_cxx_compiler_flag(-fvisibility=hidden)
   add_cxx_compiler_flag(-fstack-protector-strong RELEASE)
   add_cxx_compiler_flag(-flto RELEASE)
+  if (${CIVETWEB_ENABLE_ASAN})
   add_cxx_compiler_flag(-fsanitize=undefined DEBUG)
   add_cxx_compiler_flag(-fsanitize=address DEBUG)
   if (HAVE_CXX_FLAG_FSANITIZE_ADDRESS)
     add_cxx_compiler_flag(-static-asan DEBUG)
   endif()
+  endif()
   add_cxx_compiler_flag(-fstack-protector-all DEBUG)
   if (MINGW)
     add_cxx_compiler_flag(-mwindows)