Skip to content

Commit

Permalink
Use Release with multi-config generators in CI
Browse files Browse the repository at this point in the history
Using just one configuration will marginally speed things up, since
try_*() commands have to build artifacts for all the selected
configurations, the build system has to be generated for multiple
configurations and the build system has to process more configurations
when building.
  • Loading branch information
friendlyanon committed Mar 25, 2024
1 parent 9b14750 commit 41943cd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmake-init/templates/common/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,25 @@
"binaryDir": "${sourceDir}/build",
"hidden": true
},
{
"name": "ci-multi-config",
"description": "Speed up multi-config generators by generating only one configuration instead of the defaults",
"hidden": true,
"cacheVariables": {
"CMAKE_CONFIGURATION_TYPES": "Release"
}
},
{
"name": "ci-macos",
"inherits": ["ci-build", "ci-darwin", "dev-mode"{% if pm %}, "{= pm_name =}"{% end %}]
"inherits": ["ci-build", "ci-darwin", "dev-mode", "ci-multi-config"{% if pm %}, "{= pm_name =}"{% end %}]
},
{
"name": "ci-ubuntu",
"inherits": ["ci-build", "ci-linux", "clang-tidy"{% if pm %}, "{= pm_name =}"{% end %}, "cppcheck", "dev-mode"]
},
{
"name": "ci-windows",
"inherits": ["ci-build", "ci-win64", "dev-mode"{% if pm %}, "{= pm_name =}"{% if vcpkg %}, "vcpkg-win64-static"{% end %}{% end %}]
"inherits": ["ci-build", "ci-win64", "dev-mode", "ci-multi-config"{% if pm %}, "{= pm_name =}"{% if vcpkg %}, "vcpkg-win64-static"{% end %}{% end %}]
}
]
}

0 comments on commit 41943cd

Please sign in to comment.