3cfa724c8c
`projectile-configure-project' in conjunction with CMakePresets.json will allow to configure the project. `projectile-compile-project' does sth similar for the compile command. This is equivalent to something like ~cmake --preset clang-debug && cmake --build build --preset clang-debug~
71 lines
1.4 KiB
JSON
71 lines
1.4 KiB
JSON
{
|
|
"version": 3,
|
|
"cmakeMinimumRequired": {
|
|
"major": 3,
|
|
"minor": 21,
|
|
"patch": 0
|
|
},
|
|
"configurePresets": [
|
|
{
|
|
"name": "default",
|
|
"generator": "Ninja",
|
|
"binaryDir": "build",
|
|
"cacheVariables": {
|
|
"CMAKE_C_COMPILER": "clang",
|
|
"CMAKE_CXX_COMPILER": "clang++",
|
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
|
"FETCHCONTENT_FULLY_DISCONNECTED": "OFF"
|
|
}
|
|
},
|
|
{
|
|
"name": "clang-release",
|
|
"inherits": "default",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Release"
|
|
}
|
|
},
|
|
{
|
|
"name": "clang-debug",
|
|
"inherits": "default",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug"
|
|
}
|
|
},
|
|
{
|
|
"name": "gcc-release",
|
|
"inherits": "default",
|
|
"cacheVariables": {
|
|
"CMAKE_C_COMPILER": "gcc",
|
|
"CMAKE_CXX_COMPILER": "g++",
|
|
"CMAKE_BUILD_TYPE": "Release"
|
|
}
|
|
},
|
|
{
|
|
"name": "gcc-debug",
|
|
"inherits": "default",
|
|
"cacheVariables": {
|
|
"CMAKE_C_COMPILER": "gcc",
|
|
"CMAKE_CXX_COMPILER": "g++",
|
|
"CMAKE_BUILD_TYPE": "Debug"
|
|
}
|
|
}
|
|
],
|
|
"buildPresets": [
|
|
{
|
|
"name": "default",
|
|
"configurePreset": "default",
|
|
"jobs": 10
|
|
},
|
|
{
|
|
"name": "release",
|
|
"inherits": "default",
|
|
"configuration": "Release"
|
|
},
|
|
{
|
|
"name": "debug",
|
|
"inherits": "default",
|
|
"configuration": "Debug"
|
|
}
|
|
]
|
|
}
|