From 72cf015401f3b455b9860a617b1bf5d9312c75f6 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 9 Mar 2024 20:18:41 +0000 Subject: [PATCH] Make ccache viable for Windows Release builds --- CI/before_script.msvc.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index e11ceb499d..fdbd27fb9c 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -528,8 +528,10 @@ if ! [ -z $UNITY_BUILD ]; then add_cmake_opts "-DOPENMW_UNITY_BUILD=True" fi -if ! [ -z $USE_CCACHE ]; then - add_cmake_opts "-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" +if [ -n "$USE_CCACHE" ] && ([ -n "$NMAKE" ] || [ -n "$NINJA" ]); then + add_cmake_opts "-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DPRECOMPILE_HEADERS_WITH_MSVC=OFF" +elif [ -n "$USE_CCACHE" ]; then + echo "Ignoring -C (CCache) as it is incompatible with Visual Studio CMake generators" fi # turn on LTO by default