Skip to content

Commit

Permalink
fix: skip all files and use latest presets (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: l.feng <[email protected]>
  • Loading branch information
msclock authored Dec 8, 2024
1 parent a7fea58 commit 16764b6
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 102 deletions.
7 changes: 4 additions & 3 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ _envops:

_answers_file: .copier-answers.ss-cmake.yml

# Skip files which are most possible to custom.
_skip_if_exists:
- '*'
- '!.copier-answers.ss-cmake.yml'
- '!copier.ss-cmake.yml'
- vcpkg.json.jinja
- CMakeLists.txt.jinja
- CMakePresets.json
53 changes: 53 additions & 0 deletions template/cmake/presets/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_VERBOSE_MAKEFILE": "FALSE"
}
},
{
"name": "base-config",
"hidden": true,
"inherits": [
"ninja-config",
"vcpkg"
],
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_COMPILE_WARNING_AS_ERROR": false,
"CMAKE_VERBOSE_MAKEFILE": "FALSE"
}
}
],
"buildPresets": [
Expand All @@ -28,6 +43,18 @@
"hidden": true,
"inherits": "ninja",
"configurePreset": "base"
},
{
"name": "base-config-relwithdebinfo",
"hidden": true,
"inherits": "ninja-config-relwithdebinfo",
"configurePreset": "base-config"
},
{
"name": "base-config-debug",
"hidden": true,
"inherits": "ninja-config-debug",
"configurePreset": "base-config"
}
],
"testPresets": [
Expand All @@ -43,6 +70,32 @@
"noTestsAction": "error",
"stopOnFailure": true
}
},
{
"name": "base-config-relwithdebinfo",
"hidden": true,
"inherits": "ninja-config-relwithdebinfo",
"configurePreset": "base-config",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
}
},
{
"name": "base-config-debug",
"hidden": true,
"inherits": "ninja-config-debug",
"configurePreset": "base-config",
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
}
}
]
}
43 changes: 25 additions & 18 deletions template/cmake/presets/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,46 @@
"inherits": [
"base"
]
},
{
"name": "default-config",
"inherits": [
"base-config"
]
}
],
"buildPresets": [
{
"name": "default",
"inherits": "base",
"configurePreset": "default"
},
{
"name": "default-config-relwithdebinfo",
"inherits": "base-config-relwithdebinfo",
"configurePreset": "default-config"
},
{
"name": "default-config-debug",
"inherits": "base-config-debug",
"configurePreset": "default-config"
}
],
"testPresets": [
{
"name": "default",
"inherits": "base",
"configurePreset": "default"
}
],
"workflowPresets": [
},
{
"name": "default",
"steps": [
{
"type": "configure",
"name": "default"
},
{
"type": "build",
"name": "default"
},
{
"type": "test",
"name": "default"
}
]
"name": "default-config-relwithdebinfo",
"inherits": "base-config-relwithdebinfo",
"configurePreset": "default-config"
},
{
"name": "default-config-debug",
"inherits": "base-config-debug",
"configurePreset": "default-config"
}
]
}
22 changes: 17 additions & 5 deletions template/cmake/presets/generators/ninja.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"generator": "Ninja"
},
{
"name": "ninja-multi-config",
"name": "ninja-config",
"hidden": true,
"generator": "Ninja Multi-Config"
}
Expand All @@ -19,10 +19,16 @@
"configurePreset": "ninja"
},
{
"name": "ninja-multi-config",
"name": "ninja-config-relwithdebinfo",
"hidden": true,
"configurePreset": "ninja-multi-config",
"configurePreset": "ninja-config",
"configuration": "RelWithDebInfo"
},
{
"name": "ninja-config-debug",
"hidden": true,
"configurePreset": "ninja-config",
"configuration": "Debug"
}
],
"testPresets": [
Expand All @@ -32,10 +38,16 @@
"configurePreset": "ninja"
},
{
"name": "ninja-multi-config",
"name": "ninja-config-relwithdebinfo",
"hidden": true,
"configurePreset": "ninja-multi-config",
"configurePreset": "ninja-config",
"configuration": "RelWithDebInfo"
},
{
"name": "ninja-config-debug",
"hidden": true,
"configurePreset": "ninja-config",
"configuration": "Debug"
}
]
}
19 changes: 0 additions & 19 deletions template/cmake/presets/x64-linux-gcc.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,5 @@
"inherits": "base",
"configurePreset": "x64-linux-gcc"
}
],
"workflowPresets": [
{
"name": "x64-linux-gcc",
"steps": [
{
"type": "configure",
"name": "x64-linux-gcc"
},
{
"type": "build",
"name": "x64-linux-gcc"
},
{
"type": "test",
"name": "x64-linux-gcc"
}
]
}
]
}
19 changes: 0 additions & 19 deletions template/cmake/presets/x64-linux-llvm.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,5 @@
"inherits": "base",
"configurePreset": "x64-linux-llvm"
}
],
"workflowPresets": [
{
"name": "x64-linux-llvm",
"steps": [
{
"type": "configure",
"name": "x64-linux-llvm"
},
{
"type": "build",
"name": "x64-linux-llvm"
},
{
"type": "test",
"name": "x64-linux-llvm"
}
]
}
]
}
19 changes: 0 additions & 19 deletions template/cmake/presets/x64-mingw-dynamic-windows-mingw.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,5 @@
"inherits": "base",
"configurePreset": "x64-mingw-dynamic-windows-mingw"
}
],
"workflowPresets": [
{
"name": "x64-mingw-dynamic-windows-mingw",
"steps": [
{
"type": "configure",
"name": "x64-mingw-dynamic-windows-mingw"
},
{
"type": "build",
"name": "x64-mingw-dynamic-windows-mingw"
},
{
"type": "test",
"name": "x64-mingw-dynamic-windows-mingw"
}
]
}
]
}
19 changes: 0 additions & 19 deletions template/cmake/presets/x64-mingw-static-windows-mingw.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,5 @@
"inherits": "base",
"configurePreset": "x64-mingw-static-windows-mingw"
}
],
"workflowPresets": [
{
"name": "x64-mingw-static-windows-mingw",
"steps": [
{
"type": "configure",
"name": "x64-mingw-static-windows-mingw"
},
{
"type": "build",
"name": "x64-mingw-static-windows-mingw"
},
{
"type": "test",
"name": "x64-mingw-static-windows-mingw"
}
]
}
]
}

0 comments on commit 16764b6

Please sign in to comment.