From 22f95fca971be93a564c39909ed331f1fbf53a39 Mon Sep 17 00:00:00 2001 From: DeadlineFen <117912096+deadlinefen@users.noreply.github.com> Date: Thu, 11 May 2023 06:54:54 +0800 Subject: [PATCH] set ccache configs in env.h (#19502) --- be/CMakeLists.txt | 6 ++---- env.sh | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index b043e25448..46b2af5f3a 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -986,16 +986,14 @@ else() endif() if (ENABLE_PCH) -add_library(pch STATIC ${SRC_DIR}pch/pch.cc) + add_library(pch STATIC ${SRC_DIR}pch/pch.cc) target_precompile_headers( pch PUBLIC ${SRC_DIR}pch/pch.h ) if (COMPILER_CLANG) - add_compile_options(-Xclang -fno-pch-timestamp) - else() - add_compile_options(-fpch-preprocess) + target_compile_options(pch PRIVATE -Xclang -fno-pch-timestamp) endif() endif() diff --git a/env.sh b/env.sh index bb39f47114..52a63588ef 100755 --- a/env.sh +++ b/env.sh @@ -263,3 +263,4 @@ export GENERATOR export BUILD_SYSTEM export PKG_CONFIG_PATH="${DORIS_HOME}/thirdparty/installed/lib64/pkgconfig:${PKG_CONFIG_PATH}" +export CCACHE_SLOPPINESS="time_macros pch_defines"