Skip to content

Commit

Permalink
cmakepresets: add rpm preset
Browse files Browse the repository at this point in the history
problem: testing with the same flags as the TOSS buildfarm is currently
non-trivial

solution: add a preset, which makes it trivial
  • Loading branch information
trws committed Sep 4, 2024
1 parent 9b256aa commit fb7dde8
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,38 @@
"cacheVariables": {
"SANITIZE_ADDRESS": "ON"
}
},
{
"name": "rpm",
"displayName": "rpm",
"description": "rpm",
"generator": "Ninja",
"binaryDir": "build/rpm",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_C_COMPILER": "gcc",
"CMAKE_BUILD_TYPE":"RelWithDebInfo",
"CMAKE_EXPORT_COMPILE_COMMANDS":true,
"CMAKE_SHARED_LINKER_FLAGS":"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1",
"CMAKE_EXE_LINKER_FLAGS":"-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1",
"CMAKE_INSTALL_PREFIX":"${sourceDir}/install/rpm",
"CMAKE_C_FLAGS": "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer",
"CMAKE_CXX_FLAGS": "-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
},
"environment": {
},
"vendor": {}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default"
},
{
"name": "rpm",
"configurePreset": "rpm"
},
{
"name": "asan",
"configurePreset": "asan"
Expand All @@ -50,7 +75,7 @@
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
"stopOnFailure": false
}
},
{
Expand All @@ -67,6 +92,11 @@
"noTestsAction": "error",
"stopOnFailure": true
}
},
{
"name": "rpm",
"configurePreset": "rpm",
"inherits": "default"
}
],
"packagePresets": [
Expand Down

0 comments on commit fb7dde8

Please sign in to comment.