remove dir locals, use presets instead

`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~
This commit is contained in:
Maximilian Kueffner
2025-08-19 00:27:41 +02:00
parent caa9f12abf
commit 3cfa724c8c
2 changed files with 67 additions and 59 deletions
-8
View File
@@ -1,8 +0,0 @@
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")
((nil . ((compile-command .
(eval
(format "cmake -B build -S . -DCMAKE_C_COMIPLER=%S -DCMAKE_CXX_COMIPLER=%S -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DFETCHCONTENT_FULLY_DISCONNECTED=OFF -G Ninja && cmake --build build"
(executable-find "clang")
(executable-find "clang++")))))))
+67 -51
View File
@@ -1,54 +1,70 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
"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"
}
},
"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",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "clang-debug",
"inherits": "default",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default",
"jobs": 10
},
{
"name": "clang-release",
"inherits": "default",
"configuration": "Release"
},
{
"name": "clang-debug",
"inherits": "default",
"configuration": "Debug"
}
]
{
"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"
}
]
}