diff --git a/CMakePresets.json b/CMakePresets.json index 114b5895..a33a8802 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -7,18 +7,16 @@ }, "configurePresets": [ { - "name": "conf-common", + "name": "config-common", "description": "General settings that apply to all configurations", "hidden": true, - "generator": "Ninja", - "binaryDir": "${sourceDir}/out/build/${presetName}", - "installDir": "${sourceDir}/out/install/${presetName}" + "generator": "Ninja Multi-Config" }, { - "name": "conf-windows-common", + "name": "config-windows-common", "description": "Windows settings for MSBuild toolchain that apply to msvc and clang", "hidden": true, - "inherits": "conf-common", + "inherits": "config-common", "condition": { "type": "equals", "lhs": "${hostSystemName}", @@ -34,10 +32,10 @@ } }, { - "name": "conf-linux-common", + "name": "config-linux-common", "description": "Linux settings for gcc and clang toolchains", "hidden": true, - "inherits": "conf-common", + "inherits": "config-common", "condition": { "type": "equals", "lhs": "${hostSystemName}", @@ -50,64 +48,45 @@ } }, { - "name": "windows-msvc-debug", - "displayName": "msvc Debug", - "description": "Target Windows with the msvc compiler, debug build type", - "inherits": "conf-windows-common", + "name": "windows-msvc", + "displayName": "msvc", + "description": "Target Windows with the msvc compiler", + "inherits": "config-windows-common", "cacheVariables": { "CMAKE_C_COMPILER": "cl", "CMAKE_CXX_COMPILER": "cl", "CMAKE_BUILD_TYPE": "Debug" - } - }, - { - "name": "windows-msvc-release", - "displayName": "msvc Release", - "description": "Target Windows with the msvc compiler, release build type", - "inherits": "conf-windows-common", - "cacheVariables": { - "CMAKE_C_COMPILER": "cl", - "CMAKE_CXX_COMPILER": "cl", - "CMAKE_BUILD_TYPE": "RelWithDebInfo" - } - }, - { - "name": "windows-clang-debug", - "displayName": "clang Debug", - "description": "Target Windows with the clang compiler, debug build type", - "inherits": "conf-windows-common", - "cacheVariables": { - "CMAKE_C_COMPILER": "clang-cl", - "CMAKE_CXX_COMPILER": "clang-cl", - "CMAKE_BUILD_TYPE": "Debug" }, "vendor": { - "microsoft.com/VisualStudioSettings/CMake/1.0": { - "intelliSenseMode": "windows-clang-x64" + "jetbrains.com/clion": { + "toolchain": "Visual Studio" } } }, { - "name": "windows-clang-release", - "displayName": "clang Release", - "description": "Target Windows with the clang compiler, release build type", - "inherits": "conf-windows-common", + "name": "windows-clang", + "displayName": "clang", + "description": "Target Windows with the clang compiler", + "inherits": "config-windows-common", "cacheVariables": { "CMAKE_C_COMPILER": "clang-cl", "CMAKE_CXX_COMPILER": "clang-cl", - "CMAKE_BUILD_TYPE": "RelWithDebInfo" + "CMAKE_BUILD_TYPE": "Debug" }, "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "intelliSenseMode": "windows-clang-x64" + }, + "jetbrains.com/clion": { + "toolchain": "Visual Studio" } } }, { - "name": "linux-gcc-debug", - "displayName": "gcc Debug", - "description": "Target Linux with the gcc compiler, debug build type", - "inherits": "conf-linux-common", + "name": "linux-gcc", + "displayName": "gcc", + "description": "Target Linux with the gcc compiler", + "inherits": "config-linux-common", "cacheVariables": { "CMAKE_C_COMPILER": "gcc", "CMAKE_CXX_COMPILER": "g++", @@ -115,37 +94,71 @@ } }, { - "name": "linux-gcc-release", - "displayName": "gcc Release", - "description": "Target Linux with the gcc compiler, release build type", - "inherits": "conf-linux-common", - "cacheVariables": { - "CMAKE_C_COMPILER": "gcc", - "CMAKE_CXX_COMPILER": "g++", - "CMAKE_BUILD_TYPE": "RelWithDebInfo" - } - }, - { - "name": "linux-clang-debug", - "displayName": "clang Debug", - "description": "Target Linux with the clang compiler, debug build type", - "inherits": "conf-linux-common", + "name": "linux-clang", + "displayName": "clang", + "description": "Target Linux with the clang compiler", + "inherits": "config-linux-common", "cacheVariables": { "CMAKE_C_COMPILER": "clang", "CMAKE_CXX_COMPILER": "clang++", "CMAKE_BUILD_TYPE": "Debug" } + } + ], + "buildPresets": [ + { + "name": "build-common-debug", + "description": "Set build type to Debug", + "hidden": true, + "configuration": "Debug" }, { - "name": "linux-clang-release", - "displayName": "clang Release", - "description": "Target Linux with the clang compiler, release build type", - "inherits": "conf-linux-common", - "cacheVariables": { - "CMAKE_C_COMPILER": "clang", - "CMAKE_CXX_COMPILER": "clang++", - "CMAKE_BUILD_TYPE": "RelWithDebInfo" - } + "name": "build-common-release", + "description": "Set build type to Release", + "hidden": true, + "configuration": "Release" + }, + { + "name": "build-windows-msvc-debug", + "displayName": "Debug", + "description": "Build msvc debug on windows", + "inherits": "build-common-debug", + "configurePreset": "windows-msvc" + }, + { + "name": "build-windows-msvc-release", + "displayName": "Release", + "description": "Build msvc release on windows", + "inherits": "build-common-release", + "configurePreset": "windows-msvc" + }, + { + "name": "build-linux-gcc-debug", + "displayName": "Debug", + "description": "Build gcc debug on linux", + "inherits": "build-common-debug", + "configurePreset": "linux-gcc" + }, + { + "name": "build-linux-gcc-release", + "displayName": "Release", + "description": "Build gcc release on linux", + "inherits": "build-common-release", + "configurePreset": "linux-gcc" + }, + { + "name": "build-linux-clang-debug", + "displayName": "Debug", + "description": "Build clang debug on linux", + "inherits": "build-common-debug", + "configurePreset": "linux-clang" + }, + { + "name": "build-linux-clang-release", + "displayName": "Release", + "description": "Build clang release on linux", + "inherits": "build-common-release", + "configurePreset": "linux-clang" } ], "testPresets": [ @@ -162,60 +175,60 @@ } }, { - "name": "test-windows-msvc-debug", - "displayName": "Strict", - "description": "Enable output and stop on failure", + "name": "test-common-debug", + "description": "Test CMake settings that apply to debug configurations", + "hidden": true, "inherits": "test-common", - "configurePreset": "windows-msvc-debug" + "configuration": "Debug" }, { - "name": "test-windows-msvc-release", - "displayName": "Strict", - "description": "Enable output and stop on failure", + "name": "test-common-release", + "description": "Test CMake settings that apply to release configurations", + "hidden": true, "inherits": "test-common", - "configurePreset": "windows-msvc-release" + "configuration": "Release" }, { - "name": "test-windows-clang-debug", - "displayName": "Strict", - "description": "Enable output and stop on failure", - "inherits": "test-common", - "configurePreset": "windows-clang-debug" + "name": "test-windows-msvc-debug", + "displayName": "Debug", + "description": "Set Strict rules for windows msvc debug tests", + "inherits": "test-common-debug", + "configurePreset": "windows-msvc" }, { - "name": "test-windows-clang-release", - "displayName": "Strict", - "description": "Enable output and stop on failure", - "inherits": "test-common", - "configurePreset": "windows-clang-release" + "name": "test-windows-msvc-release", + "displayName": "Release", + "description": "Set Strict rules for windows msvc release tests", + "inherits": "test-common-release", + "configurePreset": "windows-msvc" }, { "name": "test-linux-gcc-debug", - "displayName": "Strict", - "description": "Enable output and stop on failure", - "inherits": "test-common", - "configurePreset": "linux-gcc-debug" + "displayName": "Debug", + "description": "Set Strict rules for linux gcc debug tests", + "inherits": "test-common-debug", + "configurePreset": "linux-gcc" }, { "name": "test-linux-gcc-release", - "displayName": "Strict", - "description": "Enable output and stop on failure", - "inherits": "test-common", - "configurePreset": "linux-gcc-release" + "displayName": "Release", + "description": "Set Strict rules for linux gcc release tests", + "inherits": "test-common-release", + "configurePreset": "linux-gcc" }, { "name": "test-linux-clang-debug", - "displayName": "Strict", - "description": "Enable output and stop on failure", - "inherits": "test-common", - "configurePreset": "linux-clang-debug" + "displayName": "Debug", + "description": "Set Strict rules for linux clang debug tests", + "inherits": "test-common-debug", + "configurePreset": "linux-clang" }, { "name": "test-linux-clang-release", - "displayName": "Strict", - "description": "Enable output and stop on failure", - "inherits": "test-common", - "configurePreset": "linux-clang-release" + "displayName": "Release", + "description": "Set Strict rules for linux clang release tests", + "inherits": "test-common-release", + "configurePreset": "linux-clang" } ] } \ No newline at end of file