From a949a9f395f8ee7b9980b0e41f7c9c240b5ce41f Mon Sep 17 00:00:00 2001 From: Fire-Cube Date: Sat, 28 Jun 2025 15:55:01 +0200 Subject: [PATCH] Add platform specific base presets --- CMakePresets.json | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 7d23903d6..db8e4d20f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -7,14 +7,18 @@ }, "configurePresets": [ { - "name": "x64-Clang-Base", + "name": "x64-Clang-Base-Windows", "hidden": true, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, "generator": "Ninja", "binaryDir": "${sourceDir}/Build/${presetName}", "cacheVariables": { "CMAKE_C_COMPILER": "clang-cl", - "CMAKE_CXX_COMPILER": "clang-cl", - "CMAKE_INSTALL_PREFIX": "${sourceDir}/Build/${presetName}" + "CMAKE_CXX_COMPILER": "clang-cl" }, "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { @@ -22,10 +26,26 @@ } } }, + { + "name": "x64-Clang-Base-Linux", + "hidden": true, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + }, + "generator": "Ninja", + "binaryDir": "${sourceDir}/Build/${presetName}", + "cacheVariables": { + "CMAKE_C_COMPILER": "clang", + "CMAKE_CXX_COMPILER": "clang++" + } + }, { "name": "x64-Clang-Debug", + "hidden": false, "displayName": "Clang x64 Debug", - "inherits": ["x64-Clang-Base"], + "inherits": ["x64-Clang-Base-Linux", "x64-Clang-Base-Windows"], "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } @@ -33,7 +53,7 @@ { "name": "x64-Clang-Debug-Qt", "displayName": "Clang x64 Debug with Qt", - "inherits": ["x64-Clang-Base"], + "inherits": ["x64-Clang-Base-Linux", "x64-Clang-Base-Windows"], "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", "ENABLE_QT_GUI": "ON" @@ -42,7 +62,7 @@ { "name": "x64-Clang-Release", "displayName": "Clang x64 Release", - "inherits": ["x64-Clang-Base"], + "inherits": ["x64-Clang-Base-Linux", "x64-Clang-Base-Windows"], "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } @@ -50,7 +70,7 @@ { "name": "x64-Clang-Release-Qt", "displayName": "Clang x64 Release with Qt", - "inherits": ["x64-Clang-Base"], + "inherits": ["x64-Clang-Base-Linux", "x64-Clang-Base-Windows"], "cacheVariables": { "CMAKE_BUILD_TYPE": "Release", "ENABLE_QT_GUI": "ON" @@ -59,7 +79,7 @@ { "name": "x64-Clang-RelWithDebInfo", "displayName": "Clang x64 RelWithDebInfo", - "inherits": ["x64-Clang-Base"], + "inherits": ["x64-Clang-Base-Linux", "x64-Clang-Base-Windows"], "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } @@ -67,7 +87,7 @@ { "name": "x64-Clang-RelWithDebInfo-Qt", "displayName": "Clang x64 RelWithDebInfo with Qt", - "inherits": ["x64-Clang-Base"], + "inherits": ["x64-Clang-Base-Linux", "x64-Clang-Base-Windows"], "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo", "ENABLE_QT_GUI": "ON"