Skip to content

fix cmake presets naming chaos #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 60 additions & 60 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
},
"configurePresets": [
{
"name": "config-common",
"name": "common",
"description": "General settings that apply to all configurations",
"hidden": true,
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}"
"binaryDir": "${sourceDir}/build",
"installDir": "${sourceDir}/out/stage"
},
{
"name": "config-windows-common",
"name": "windows-common",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the hidden presets that are used to compose the non-hidden presets (using the "inherits") I would prefer to keep the prefix type to prevent any misuse. Those hidden names are not visible to the end user anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure, build, and test preets are independent namespaces!

you can't inherit a build preset from a configure preset AFAIK!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats' a good point. I changed them all in the most recent version!

"description": "Windows settings for MSBuild toolchain that apply to msvc and clang",
"hidden": true,
"inherits": "config-common",
"inherits": "common",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
Expand All @@ -38,10 +38,10 @@
}
},
{
"name": "config-unixlike-common",
"name": "unixlike-common",
"description": "Unix-like OS settings for gcc and clang toolchains",
"hidden": true,
"inherits": "config-common",
"inherits": "common",
"condition": {
"type": "inList",
"string": "${hostSystemName}",
Expand All @@ -57,7 +57,7 @@
}
},
{
"name": "config-msvc-compiler",
"name": "msvc-compiler",
"description": "Set cl as the compiler to be used",
"hidden": true,
"cacheVariables": {
Expand All @@ -66,7 +66,7 @@
}
},
{
"name": "config-clangcl-compiler",
"name": "clangcl-compiler",
"description": "Set clang-cl as the compiler to be used",
"hidden": true,
"cacheVariables": {
Expand All @@ -80,7 +80,7 @@
}
},
{
"name": "config-gcc-compiler",
"name": "gcc-compiler",
"description": "Set gcc as the compiler to be used",
"hidden": true,
"cacheVariables": {
Expand All @@ -89,7 +89,7 @@
}
},
{
"name": "config-clang-compiler",
"name": "clang-compiler",
"description": "Set clang as the compiler to be used",
"hidden": true,
"cacheVariables": {
Expand All @@ -102,103 +102,103 @@
"displayName": "msvc",
"description": "Target Windows with the msvc compiler",
"inherits": [
"config-windows-common",
"config-msvc-compiler"
"windows-common",
"msvc-compiler"
]
},
{
"name": "windows-clang",
"displayName": "clang",
"description": "Target Windows with the clang compiler",
"inherits": [
"config-windows-common",
"config-clangcl-compiler"
"windows-common",
"clangcl-compiler"
]
},
{
"name": "unixlike-gcc",
"displayName": "gcc",
"description": "Target unix-like OS with the gcc compiler",
"inherits": [
"config-unixlike-common",
"config-gcc-compiler"
"unixlike-common",
"gcc-compiler"
]
},
{
"name": "unixlike-clang",
"displayName": "clang",
"description": "Target Unix-like OS with the clang compiler",
"inherits": [
"config-unixlike-common",
"config-clang-compiler"
"unixlike-common",
"clang-compiler"
]
}
],
"buildPresets": [
{
"name": "build-common-debug",
"name": "common-debug",
"description": "Set build type to Debug",
"hidden": true,
"configuration": "Debug"
},
{
"name": "build-common-release",
"name": "common-release",
"description": "Set build type to Release",
"hidden": true,
"configuration": "Release"
},
{
"name": "build-common-relwithdebinfo",
"name": "common-relwithdebinfo",
"description": "Set build type to Release",
"hidden": true,
"configuration": "RelWithDebInfo"
},
{
"name": "build-windows-msvc-debug",
"name": "windows-msvc-debug",
"displayName": "Debug",
"description": "Build msvc debug on windows",
"inherits": "build-common-debug",
"inherits": "common-debug",
"configurePreset": "windows-msvc"
},
{
"name": "build-windows-msvc-release",
"name": "windows-msvc-release",
"displayName": "Release",
"description": "Build msvc release on windows",
"inherits": "build-common-release",
"inherits": "common-release",
"configurePreset": "windows-msvc"
},
{
"name": "build-unixlike-gcc-debug",
"name": "gcc-debug",
"displayName": "Debug",
"description": "Build gcc debug on unixlike OS",
"inherits": "build-common-debug",
"description": "Build gcc debug on linux",
"inherits": "common-debug",
"configurePreset": "unixlike-gcc"
},
{
"name": "build-unixlike-gcc-release",
"name": "gcc-release",
"displayName": "Release",
"description": "Build gcc release on unixlike OS",
"inherits": "build-common-release",
"description": "Build gcc release on linux",
"inherits": "common-release",
"configurePreset": "unixlike-gcc"
},
{
"name": "build-unixlike-clang-debug",
"name": "clang-debug",
"displayName": "Debug",
"description": "Build clang debug on unixlike OS",
"inherits": "build-common-debug",
"description": "Build clang debug on linux",
"inherits": "common-debug",
"configurePreset": "unixlike-clang"
},
{
"name": "build-unixlike-clang-release",
"name": "clang-release",
"displayName": "Release",
"description": "Build clang release on unixlike OS",
"inherits": "build-common-release",
"description": "Build clang release on linux",
"inherits": "common-release",
"configurePreset": "unixlike-clang"
}
],
"testPresets": [
{
"name": "test-common",
"name": "common",
"description": "Test CMake settings that apply to all configurations",
"hidden": true,
"output": {
Expand All @@ -210,74 +210,74 @@
}
},
{
"name": "test-common-debug",
"name": "common-debug",
"description": "Test CMake settings that apply to debug configurations",
"hidden": true,
"inherits": "test-common",
"inherits": "common",
"configuration": "Debug"
},
{
"name": "test-common-release",
"name": "common-release",
"description": "Test CMake settings that apply to release configurations",
"hidden": true,
"inherits": "test-common",
"inherits": "common",
"configuration": "Release"
},
{
"name": "test-windows-msvc-debug",
"name": "windows-msvc-debug",
"displayName": "Debug",
"description": "Set Strict rules for windows msvc debug tests",
"inherits": "test-common-debug",
"inherits": "common-debug",
"configurePreset": "windows-msvc"
},
{
"name": "test-windows-msvc-release",
"name": "windows-msvc-release",
"displayName": "Release",
"description": "Set Strict rules for windows msvc release tests",
"inherits": "test-common-release",
"inherits": "common-release",
"configurePreset": "windows-msvc"
},
{
"name": "test-windows-clang-debug",
"name": "windows-clang-debug",
"displayName": "Debug",
"description": "Set Strict rules for windows clang debug tests",
"inherits": "test-common-debug",
"inherits": "common-debug",
"configurePreset": "windows-clang"
},
{
"name": "test-windows-clang-release",
"name": "windows-clang-release",
"displayName": "Release",
"description": "Set Strict rules for windows clang release tests",
"inherits": "test-common-release",
"inherits": "common-release",
"configurePreset": "windows-clang"
},
{
"name": "test-unixlike-gcc-debug",
"name": "gcc-debug",
"displayName": "Debug",
"description": "Set Strict rules for unixlike gcc debug tests",
"inherits": "test-common-debug",
"inherits": "common-debug",
"configurePreset": "unixlike-gcc"
},
{
"name": "test-unixlike-gcc-release",
"name": "gcc-release",
"displayName": "Release",
"description": "Set Strict rules for unixlike gcc release tests",
"inherits": "test-common-release",
"inherits": "common-release",
"configurePreset": "unixlike-gcc"
},
{
"name": "test-unixlike-clang-debug",
"name": "clang-debug",
"displayName": "Debug",
"description": "Set Strict rules for unixlike clang debug tests",
"inherits": "test-common-debug",
"inherits": "common-debug",
"configurePreset": "unixlike-clang"
},
{
"name": "test-unixlike-clang-release",
"name": "clang-release",
"displayName": "Release",
"description": "Set Strict rules for unixlike clang release tests",
"inherits": "test-common-release",
"inherits": "common-release",
"configurePreset": "unixlike-clang"
}
]
}
}
Loading