From 290ee4e02c35e2615132d1b587a6decf7f98b0f8 Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Tue, 17 Dec 2024 20:45:23 +0000 Subject: [PATCH] Add RelWithDebInfo preset for Linux. --- CMakePresets.json | 52 +++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 40c089dc..3c2d0987 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -60,14 +60,12 @@ } }, { - "name": "linux-debug", - "displayName": "Linux Debug", - "description": "Target the Windows Subsystem for Linux (WSL) or a remote Linux system.", + "name": "linux-base", + "hidden": true, "generator": "Ninja", "binaryDir": "${sourceDir}/out/build/${presetName}", "installDir": "${sourceDir}/out/install/${presetName}", "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", "CMAKE_TOOLCHAIN_FILE": { "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", "type": "FILEPATH" @@ -92,37 +90,29 @@ } } }, + { + "name": "linux-debug", + "displayName": "Linux-Debug", + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-relwithdebinfo", + "displayName": "Linux-RelWithDebInfo", + "inherits": "linux-base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo" + } + }, { "name": "linux-release", - "displayName": "Linux Release", - "description": "Target the Windows Subsystem for Linux (WSL) or a remote Linux system.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/out/build/${presetName}", - "installDir": "${sourceDir}/out/install/${presetName}", + "displayName": "Linux-Release", + "inherits": "linux-base", "cacheVariables": { "CMAKE_BUILD_TYPE": "Release", - "CMAKE_TOOLCHAIN_FILE": { - "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", - "type": "FILEPATH" - }, - "VCPKG_TARGET_TRIPLET": { - "value": "x64-linux", - "type": "STRING" - }, - "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/toolchains/linux-clang.cmake" - }, - "environment": { - "VCPKG_ROOT": "${sourceDir}/thirdparty/vcpkg" - }, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Linux" - }, - "vendor": { - "microsoft.com/VisualStudioRemoteSettings/CMake/2.0": { - "remoteSourceRootDir": "$env{HOME}/.vs/$ms{projectDirName}" - } + "CMAKE_INTERPROCEDURAL_OPTIMIZATION": true } } ]