Skip to content

Commit 6d87d79

Browse files
committed
Define GLIBCXX_DEBUG in Debug builds with libstdc++
1 parent 953f7b3 commit 6d87d79

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

.github/files/CMakeUserPresets.json

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@
5555
"inherits": [
5656
"_ci-common",
5757
"_ci-ubuntu-clang-libstdc++",
58+
"_ci-libstdc++-debug",
5859
"_ci-debug",
5960
"_ci-clang-tidy"
60-
]
61+
],
62+
"cacheVariables": {
63+
"CMAKE_CXX_FLAGS": "$env{PRESET_CXX_FLAGS_LIBSTDCPP_DEBUG} $env{PRESET_CXX_FLAGS_GCC_CLANG} $env{PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_COMMON} $env{PRESET_CXX_FLAGS_LIBSTDCPP_FOR_CLANG_UBUNTU}"
64+
}
6165
},
6266
{
6367
"name": "ci-ubuntu-clang-libstdc++-release",
@@ -70,7 +74,15 @@
7074
},
7175
{
7276
"name": "ci-ubuntu-gcc-libstdc++-debug",
73-
"inherits": ["_ci-common", "_ci-ubuntu-gcc", "_ci-debug"]
77+
"inherits": [
78+
"_ci-common",
79+
"_ci-ubuntu-gcc",
80+
"_ci-libstdc++-debug",
81+
"_ci-debug"
82+
],
83+
"cacheVariables": {
84+
"CMAKE_CXX_FLAGS": "$env{PRESET_CXX_FLAGS_LIBSTDCPP_DEBUG} $env{PRESET_CXX_FLAGS_GCC_CLANG}"
85+
}
7486
},
7587
{
7688
"name": "ci-ubuntu-gcc-libstdc++-release",
@@ -128,6 +140,16 @@
128140
"CMAKE_CXX_FLAGS": "$env{PRESET_CXX_FLAGS_GCC_CLANG}"
129141
}
130142
},
143+
{
144+
"name": "_ci-libstdc++-debug",
145+
"hidden": true,
146+
"environment": {
147+
"PRESET_CXX_FLAGS_LIBSTDCPP_DEBUG": "-D_GLIBCXX_DEBUG"
148+
},
149+
"cacheVariables": {
150+
"CMAKE_CXX_FLAGS": "$env{PRESET_CXX_FLAGS_LIBSTDCPP_DEBUG}"
151+
}
152+
},
131153
{
132154
"name": "_ci-debug",
133155
"hidden": true,

0 commit comments

Comments
 (0)