Skip to content

Commit

Permalink
Added a Ninja-Clang configuration.
Browse files Browse the repository at this point in the history
Requires Clang -v 17 or above.
  • Loading branch information
MStachowicz committed Aug 26, 2024
1 parent 3254294 commit 33c59fa
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@
"CMAKE_CXX_FLAGS_RELEASE": "-DZ_RELEASE -g0 -O3",
"CMAKE_C_FLAGS_RELEASE": "-DZ_RELEASE -g0 -O3"
}
},
{
"name": "Ninja-Clang",
"description": "Generate using Ninja multi-config, build using clang and clang++",
"generator": "Ninja Multi-Config",
"binaryDir": "build/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_CXX_FLAGS_DEBUG": "-DZ_DEBUG -g3 -ggdb -O0",
"CMAKE_C_FLAGS_DEBUG": "-DZ_DEBUG -g3 -ggdb -O0",
"CMAKE_CXX_FLAGS_RELEASE": "-DZ_RELEASE -g0 -O3",
"CMAKE_C_FLAGS_RELEASE": "-DZ_RELEASE -g0 -O3"
}
}
],
"buildPresets": [
Expand Down Expand Up @@ -128,6 +142,22 @@
"configuration": "Debug",
"verbose": false,
"targets": [ "Spirit", "Test" ]
},
{
"name": "clang++-Release",
"displayName": "Release",
"configurePreset": "Ninja-Clang",
"configuration": "Release",
"verbose": false,
"targets": [ "Spirit", "Test" ]
},
{
"name": "clang++-Debug",
"displayName": "Debug",
"configurePreset": "Ninja-Clang",
"configuration": "Debug",
"verbose": false,
"targets": [ "Spirit", "Test" ]
}
]
}

0 comments on commit 33c59fa

Please sign in to comment.