This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit bca91c3da4b6b8e5bd4bbebf1868c85fc04d9468
Author: Jack Drogon <[email protected]>
AuthorDate: Thu Jan 25 13:59:41 2024 +0800

    [refactor](cmake) Refactor be CMakeLists ENABLE_CLANG_COVERAGE 
CMAKE_CXX_FLAGS byadd_compile_options (#30333)
---
 be/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index bba09ebc2a6..ba1d94f6b60 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -659,7 +659,7 @@ set(BUILD_SHARED_LIBS OFF)
 
 option(ENABLE_CLANG_COVERAGE "coverage option" OFF)
 if (ENABLE_CLANG_COVERAGE AND ENABLE_CLANG_COVERAGE STREQUAL ON AND 
COMPILER_CLANG)
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-instr-generate 
-fcoverage-mapping -DLLVM_PROFILE")
+    add_compile_options(-fprofile-instr-generate -fcoverage-mapping 
-DLLVM_PROFILE)
 endif ()
 
 if (MAKE_TEST)
@@ -767,3 +767,4 @@ foreach(dir ${dirs})
     message(STATUS "dir='${dir}'")
 endforeach()
 
+


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to