Inheriting complier flags from multiple config presets.

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?

At this point, presets can only set individual cache variables to single values. There’s no way to accumulate values into a cache variable.

A workaround is to have your presets set separate variables specific to your CMakeLists.txt and to accumulate the flags yourself.

Thanks for the reply