From e5226cb21641d5c145f64b06cd3dc3dbd11f1f09 Mon Sep 17 00:00:00 2001 From: Supakorn 'Jamie' Rassameemasmuang Date: Thu, 22 Aug 2024 01:29:25 -0600 Subject: [PATCH] CMAKE: Add ccache to compilation preset. --- CMakePresets.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CMakePresets.json b/CMakePresets.json index 021501cd5..eae4f6a70 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -50,6 +50,14 @@ }, "hidden": true }, + { + "name": "base/linuxCcache", + "cacheVariables": { + "CMAKE_C_COMPILER_LAUNCHER": "ccache", + "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" + }, + "hidden": true + }, { "name": "base/gccCompatCacheVar", "cacheVariables": { @@ -78,6 +86,12 @@ "binaryDir": "${sourceDir}/cmake-build-linux/release", "inherits": ["base/buildBaseWithVcpkg", "base/release"] }, + { + "name": "linux/release-ccache", + "displayName": "[linux-x86/64] Release (with ccache)", + "binaryDir": "${sourceDir}/cmake-build-linux/release", + "inherits": ["base/buildBaseWithVcpkg", "base/release", "base/linuxCcache"] + }, { "name": "linux/releaseWithDebugInfo", "displayName": "[linux-x86/64] Release with Debug Info", @@ -139,6 +153,11 @@ "name": "linux/release", "displayName": "[linux-x86/64] Release", "configurePreset": "linux/release" + }, + { + "name": "linux/release-ccache", + "displayName": "[linux-x86/64] Release (with ccache)", + "configurePreset": "linux/release-ccache" } ] }