From 48651417a32186c1c99302b8ad73c42285015b89 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Fri, 4 Sep 2026 15:25:35 +0200 Subject: [PATCH] CI: Use ccache in VS cmake submodules --- .github/workflows/rpcs3.yml | 1 + 3rdparty/OpenAL/openal-soft.vcxproj | 4 ++++ 3rdparty/curl/libcurl.vcxproj | 4 ++++ 3rdparty/protobuf/protobuf_build.vcxproj | 4 ++++ 4 files changed, 13 insertions(+) diff --git a/.github/workflows/rpcs3.yml b/.github/workflows/rpcs3.yml index ef862bb20b8e..1b0a91fe1553 100644 --- a/.github/workflows/rpcs3.yml +++ b/.github/workflows/rpcs3.yml @@ -223,6 +223,7 @@ jobs: CCACHE_DIR: 'C:\ccache' CCACHE_INODECACHE: 'true' CCACHE_SLOPPINESS: 'time_macros' + CCACHE_LAUNCH_ARGS: '-DCMAKE_C_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe -DCMAKE_CXX_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe' DEPS_CACHE_DIR: ./dependency_cache UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win" diff --git a/3rdparty/OpenAL/openal-soft.vcxproj b/3rdparty/OpenAL/openal-soft.vcxproj index 5e751c9a95db..8112f813a6d4 100644 --- a/3rdparty/OpenAL/openal-soft.vcxproj +++ b/3rdparty/OpenAL/openal-soft.vcxproj @@ -49,9 +49,11 @@ call vsdevcmd.bat -arch=amd64 cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)" + if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS= cmake -G Ninja ^ -DCMAKE_CXX_COMPILER="cl.exe" ^ -DCMAKE_C_COMPILER="cl.exe" ^ + %25CCACHE_LAUNCH_ARGS%25 ^ -DCMAKE_BUILD_TYPE="Release" ^ -DCMAKE_INSTALL_PREFIX="./Release" ^ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^ @@ -70,9 +72,11 @@ call vsdevcmd.bat -arch=amd64 cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)" + if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS= cmake -G Ninja ^ -DCMAKE_CXX_COMPILER="cl.exe" ^ -DCMAKE_C_COMPILER="cl.exe" ^ + %25CCACHE_LAUNCH_ARGS%25 ^ -DCMAKE_BUILD_TYPE="Debug" ^ -DCMAKE_INSTALL_PREFIX="./Debug" ^ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug ^ diff --git a/3rdparty/curl/libcurl.vcxproj b/3rdparty/curl/libcurl.vcxproj index f0935b57ea69..d07a53a8f984 100644 --- a/3rdparty/curl/libcurl.vcxproj +++ b/3rdparty/curl/libcurl.vcxproj @@ -38,9 +38,11 @@ call vsdevcmd.bat -arch=amd64 cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)" + if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS= cmake -G Ninja ^ -DCMAKE_CXX_COMPILER="cl.exe" ^ -DCMAKE_C_COMPILER="cl.exe" ^ + %25CCACHE_LAUNCH_ARGS%25 ^ -DCMAKE_BUILD_TYPE="Release" ^ -DCMAKE_INSTALL_PREFIX="./Release" ^ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^ @@ -63,9 +65,11 @@ call vsdevcmd.bat -arch=amd64 cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)" + if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS= cmake -G Ninja ^ -DCMAKE_CXX_COMPILER="cl.exe" ^ -DCMAKE_C_COMPILER="cl.exe" ^ + %25CCACHE_LAUNCH_ARGS%25 ^ -DCMAKE_BUILD_TYPE="Debug" ^ -DCMAKE_INSTALL_PREFIX="./Debug" ^ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug ^ diff --git a/3rdparty/protobuf/protobuf_build.vcxproj b/3rdparty/protobuf/protobuf_build.vcxproj index 93bd7fad4336..f7010a6c13ac 100644 --- a/3rdparty/protobuf/protobuf_build.vcxproj +++ b/3rdparty/protobuf/protobuf_build.vcxproj @@ -41,9 +41,11 @@ call vsdevcmd.bat -arch=amd64 if not exist "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" mkdir "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" + if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS= cmake -G Ninja ^ -DCMAKE_CXX_COMPILER="cl.exe" ^ -DCMAKE_C_COMPILER="cl.exe" ^ + %25CCACHE_LAUNCH_ARGS%25 ^ -DCMAKE_CXX_STANDARD=20 ^ -DCMAKE_BUILD_TYPE="Release" ^ -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" ^ @@ -67,9 +69,11 @@ call vsdevcmd.bat -arch=amd64 if not exist "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" mkdir "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" + if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS= cmake -G Ninja ^ -DCMAKE_CXX_COMPILER="cl.exe" ^ -DCMAKE_C_COMPILER="cl.exe" ^ + %25CCACHE_LAUNCH_ARGS%25 ^ -DCMAKE_CXX_STANDARD=20 ^ -DCMAKE_BUILD_TYPE="Debug" ^ -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" ^