cmake: Changed the preset names, made clang always use lld, and added a new lto preset.

This commit is contained in:
arcum42 2023-01-03 17:37:32 -08:00
parent 4921afdb51
commit 3254d27fc2
1 changed files with 48 additions and 37 deletions

View File

@ -7,85 +7,99 @@
},
"configurePresets": [
{
"name": "defaults",
"displayName": "Defaults",
"description": "Base preset. Only for inheriting from.",
"name": "gcc-base",
"displayName": "GCC Base",
"description": "Base preset for GCC. Only for inheriting from.",
"hidden": true,
"binaryDir": "${sourceDir}/build"
},
{
"name": "clang",
"displayName": "Clang",
"description": "Base clang preset. Only for inheriting from.",
"name": "clang-base",
"displayName": "Base",
"description": "Base preset for Clang. Only for inheriting from.",
"hidden": true,
"inherits": "defaults",
"binaryDir": "${sourceDir}/build",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_EXE_LINKER_FLAGS_INIT": "-fuse-ld=lld",
"CMAKE_MODULE_LINKER_FLAGS_INIT": "-fuse-ld=lld",
"CMAKE_SHARED_LINKER_FLAGS_INIT": "-fuse-ld=lld",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++"
}
},
{
"name": "lto",
"displayName": "Default Profile using clang/ninja & lto.",
"description": "Release lto build using ninja & clang.",
"inherits": "clang-base",
"cacheVariables": {
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ninja-multi",
"displayName": "Ninja Multi Config",
"description": "Generate multiple ninja build files.",
"inherits": "defaults",
"inherits": "gcc-base",
"generator": "Ninja Multi-Config"
},
{
"name": "debug",
"displayName": "Debug",
"description": "Debug build with make.",
"inherits": "defaults",
"name": "gcc-debug",
"displayName": "GCC Debug",
"description": "GCC Debug build with make.",
"inherits": "gcc-base",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "devel",
"displayName": "Devel",
"description": "Developer build using make.",
"inherits": "defaults",
"name": "gcc-devel",
"displayName": "GCC Devel",
"description": "GCC Developer build using make.",
"inherits": "gcc-base",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Devel"
}
},
{
"name": "release",
"displayName": "Release",
"description": "Release build using make.",
"inherits": "defaults",
"name": "gcc-release",
"displayName": "GCC Release",
"description": "GCC Release build using make.",
"inherits": "gcc-base",
"generator": "Unix Makefiles",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "debug-ninja",
"displayName": "Debug Ninja",
"name": "gcc-debug-ninja",
"displayName": "GCC Debug Ninja",
"description": "Debug build using ninja.",
"inherits": "defaults",
"inherits": "gcc-base",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "devel-ninja",
"displayName": "Devel Ninja",
"description": "Developer build using ninja.",
"inherits": "defaults",
"name": "gcc-devel-ninja",
"displayName": "GCC Devel Ninja",
"description": "GCC Developer build using ninja.",
"inherits": "gcc-base",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Devel"
}
},
{
"name": "release-ninja",
"displayName": "Release Ninja",
"description": "Release build using ninja.",
"inherits": "defaults",
"name": "gcc-release-ninja",
"displayName": "GCC Release Ninja",
"description": "GCC Release build using ninja.",
"inherits": "gcc-base",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
@ -95,8 +109,7 @@
"name": "clang-debug",
"displayName": "Clang Debug",
"description": "Debug build using ninja and clang.",
"generator": "Ninja",
"inherits": "clang",
"inherits": "clang-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
@ -105,8 +118,7 @@
"name": "clang-devel",
"displayName": "Clang Devel",
"description": "Developer build using ninja & clang.",
"generator": "Ninja",
"inherits": "clang",
"inherits": "clang-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Devel"
}
@ -115,8 +127,7 @@
"name": "clang-release",
"displayName": "Clang Release",
"description": "Release build using ninja & clang.",
"generator": "Ninja",
"inherits": "clang",
"inherits": "clang-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}