CMakeLists.txt, .vscode: enable cmake compile_commands.json and add VSCode configuration

This commit is contained in:
Silvan Calarco 2024-07-06 15:07:24 +02:00
parent 0aff59e3f3
commit 7ae467a639
3 changed files with 28 additions and 0 deletions

17
.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,17 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}

9
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,9 @@
{
"cmake.configureOnOpen": true,
"files.associations": {
"iostream": "cpp",
"vector": "cpp",
"string": "cpp",
"format": "cpp"
}
}

View File

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR)
project(distromatic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
if (NOT SYSCONF_INSTALL_DIR)