Is it possible to have multiple configuration presets that add compiler options to CMAKE_CXX_FLAGS?
For example,
{
"name": "common-presets",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS_INIT": "-Dproperty-1"
}
{
"name": "specific-presets",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS_INIT": "-Dproperty-2"
}
{
"name": "My-Target",
"description": "My Release target.",
"displayName": "My_Release_Target",
"inherits": [ "common-presets", "specific-presets" ],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_CXX_FLAGS_INIT": "-Dproperty-3"
}
}
-
I would expect to see -DCMAKE_CXX_FLAGS_INIT:STRING="-Dproperty-1 -Dproperty-2 -Dproperty-3"
But I see
-DCMAKE_CXX_FLAGS_INIT:STRING="-Dproperty-3"
Am I doing something wrong or are my expectations incorrect?