Skip to content

Commit

Permalink
Add basic CMakePresets
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Oct 26, 2023
1 parent 339f94c commit 2050292
Show file tree
Hide file tree
Showing 4 changed files with 370 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ GKlib

include/metis.h

### Project specific
CMakeUserPresets.json
cmake-build-*
12 changes: 12 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 25,
"patch": 0
},
"include": [
"cmake/CMakePresets-defaults.json",
"cmake/CMakePresets-CI.json"
]
}
305 changes: 305 additions & 0 deletions cmake/CMakePresets-CI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
{
"version": 6,
"include": [
"CMakePresets-defaults.json"
],
"configurePresets": [
{
"name": "ci-base",
"hidden": true,
"generator": "Ninja",
"inherits": [
"default"
],
"cacheVariables": {
"METIS_TESTS": {
"type": "BOOL",
"value": true
},
"METIS_PROGRAMS": {
"type": "BOOL",
"value": true
}
},
"errors": {
"deprecated": true
}
},
{
"name": "gcc-ci",
"displayName": "GCC toolchain",
"inherits": [
"ci-base"
],
"binaryDir": "cmake-build-ci-gcc",
"cacheVariables": {
"CMAKE_C_COMPILER": {
"type": "FILEPATH",
"value": "gcc"
},
"CMAKE_LINKER_TYPE": {
"type": "STRING",
"value": "SYSTEM"
}
}
},
{
"name": "intel-ci",
"displayName": "Intel toolchain",
"inherits": [
"ci-base"
],
"binaryDir": "cmake-build-ci-intel",
"cacheVariables": {
"CMAKE_C_COMPILER": {
"type": "FILEPATH",
"value": "icx"
},
"CMAKE_LINKER_TYPE": {
"type": "STRING",
"value": "SYSTEM"
}
}
},
{
"name": "llvm-ci",
"displayName": "LLVM (Clang) toolchain",
"inherits": [
"ci-base"
],
"binaryDir": "cmake-build-ci-llvm",
"cacheVariables": {
"CMAKE_C_COMPILER": {
"type": "FILEPATH",
"value": "clang"
},
"CMAKE_LINKER_TYPE": {
"type": "STRING",
"value": "LLD"
}
}
},
{
"name": "windows-ci",
"displayName": "Windows native toolchain",
"inherits": [
"ci-base"
],
"binaryDir": "cmake-build-ci-windows",
"cacheVariables": {
"CMAKE_C_COMPILER": {
"type": "FILEPATH",
"value": "cl"
}
}
},
{
"name": "macos-ci",
"displayName": "MacOS native toolchain",
"inherits": [
"ci-base"
],
"binaryDir": "cmake-build-ci-macos",
"cacheVariables": {
"CMAKE_C_COMPILER": {
"type": "FILEPATH",
"value": "clang"
}
}
}
],
"buildPresets": [
{
"name": "ci-base",
"hidden": true,
"inherits": [
"default"
],
"cleanFirst": true
},
{
"name": "gcc-ci",
"displayName": "GCC toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "gcc-ci"
},
{
"name": "intel-ci",
"displayName": "Intel toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "intel-ci"
},
{
"name": "llvm-ci",
"displayName": "LLVM (Clang) toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "llvm-ci"
},
{
"name": "windows-ci",
"displayName": "Windows native toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "windows-ci"
},
{
"name": "macos-ci",
"displayName": "MacOS native toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "macos-ci"
}
],
"testPresets": [
{
"name": "ci-base",
"hidden": true,
"inherits": [
"default"
],
"output": {
"outputOnFailure": true
}
},
{
"name": "gcc-ci",
"displayName": "GCC toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "gcc-ci"
},
{
"name": "intel-ci",
"displayName": "Intel toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "intel-ci"
},
{
"name": "llvm-ci",
"displayName": "LLVM (Clang) toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "llvm-ci"
},
{
"name": "windows-ci",
"displayName": "Windows native toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "windows-ci"
},
{
"name": "macos-ci",
"displayName": "MacOS native toolchain",
"inherits": [
"ci-base"
],
"configurePreset": "macos-ci"
}
],
"workflowPresets": [
{
"name": "gcc-ci",
"displayName": "GCC toolchain",
"steps": [
{
"type": "configure",
"name": "gcc-ci"
},
{
"type": "build",
"name": "gcc-ci"
},
{
"type": "test",
"name": "gcc-ci"
}
]
},
{
"name": "intel-ci",
"displayName": "Intel toolchain",
"steps": [
{
"type": "configure",
"name": "intel-ci"
},
{
"type": "build",
"name": "intel-ci"
},
{
"type": "test",
"name": "intel-ci"
}
]
},
{
"name": "llvm-ci",
"displayName": "LLVM (Clang) toolchain",
"steps": [
{
"type": "configure",
"name": "llvm-ci"
},
{
"type": "build",
"name": "llvm-ci"
},
{
"type": "test",
"name": "llvm-ci"
}
]
},
{
"name": "windows-ci",
"displayName": "Windows native toolchain",
"steps": [
{
"type": "configure",
"name": "windows-ci"
},
{
"type": "build",
"name": "windows-ci"
},
{
"type": "test",
"name": "windows-ci"
}
]
},
{
"name": "macos-ci",
"displayName": "MacOS native toolchain",
"steps": [
{
"type": "configure",
"name": "macos-ci"
},
{
"type": "build",
"name": "macos-ci"
},
{
"type": "test",
"name": "macos-ci"
}
]
}
]
}
50 changes: 50 additions & 0 deletions cmake/CMakePresets-defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"version": 6,
"configurePresets": [
{
"name": "default",
"displayName": "Default preset",
"binaryDir": "cmake-build-release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Release"
}
}
}
],
"buildPresets": [
{
"name": "default",
"displayName": "Default preset",
"configurePreset": "default"
}
],
"testPresets": [
{
"name": "default",
"displayName": "Default preset",
"configurePreset": "default"
}
],
"workflowPresets": [
{
"name": "default",
"displayName": "Default workflow",
"steps": [
{
"type": "configure",
"name": "default"
},
{
"type": "build",
"name": "default"
},
{
"type": "test",
"name": "default"
}
]
}
]
}

0 comments on commit 2050292

Please sign in to comment.