Skip to content

Commit

Permalink
Set windows default build as release (#321)
Browse files Browse the repository at this point in the history
Refactor cmake presets to keep windows release as the default preset to
help newcomers.

Signed-off-by: Renato Foot <renato@foot.br>
  • Loading branch information
Costallat committed Apr 18, 2022
1 parent c17279a commit 657db93
Showing 1 changed file with 17 additions and 33 deletions.
50 changes: 17 additions & 33 deletions CMakePresets.json
Expand Up @@ -7,16 +7,21 @@
},
"configurePresets": [
{
"name": "windows-default",
"displayName": "Windows Default",
"description": "Sets Ninja generator, compilers and build",
"name": "windows-release",
"displayName": "Windows - Release",
"description": "Sets Ninja generator, compilers, build and install directory and set build type as release",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": {
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"type": "FILEPATH"
}
},
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
},
"architecture": {
"value": "x64",
"strategy": "external"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
Expand All @@ -30,40 +35,28 @@
}
},
{
"name": "linux-default",
"displayName": "Linux Default",
"description": "Sets Ninja generator, compilers, build and install directory, debug build type",
"name": "linux-release",
"displayName": "Linux - Release",
"description": "Sets Ninja generator, compilers, build and install directory and set build type as release",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": {
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"type": "FILEPATH"
}
},
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "windows-release",
"inherits": "windows-default",
"displayName": "Windows - Release Build",
"description": "Build Release Mode",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
},
"architecture": {
"value": "x64",
"strategy": "external"
}
},
{
"name": "windows-debug",
"inherits": "windows-default",
"displayName": "Windows - Debug Build",
"inherits": "windows-release",
"displayName": "Windows - Debug",
"description": "Build Debug Mode",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
Expand All @@ -75,18 +68,9 @@
"strategy": "external"
}
},
{
"name": "linux-release",
"inherits": "linux-default",
"displayName": "Linux - Release Build",
"description": "Build Release Mode",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "linux-debug",
"inherits": "linux-default",
"inherits": "linux-release",
"displayName": "Linux - Debug Build",
"description": "Build Debug Mode",
"cacheVariables": {
Expand Down

0 comments on commit 657db93

Please sign in to comment.