This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch try_fixing_codeql
in repository https://gitbox.apache.org/repos/asf/tsfile.git
The following commit(s) were added to refs/heads/try_fixing_codeql by this push:
new 5db81d91 try to fix codeql
5db81d91 is described below
commit 5db81d91acf274405ea814ff4732cb55960cab04
Author: HTHou <[email protected]>
AuthorDate: Thu Sep 12 09:51:03 2024 +0800
try to fix codeql
---
cpp/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 997e1d2a..0b8eec34 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -27,6 +27,10 @@ message("cmake using: USE_CPP11=${USE_CPP11}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+if(NOT WIN32)
+# enable address sanitizer default
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g")
+endif()
if(DEFINED ENV{CXX})
set(CMAKE_CXX_COMPILER $ENV{CXX})