Not possible to append/extend source_group regex for "Source Files" group
The "Source files" group regex i currently hard-coded:
#define CM_SOURCE_REGEX \
"\\.(C|F|M|c|c\\+\\+|cc|cpp|mpp|cxx|ixx|cppm|ccm|cxxm|c\\+\\+m|cu" \
"|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$"
...
this->AddSourceGroup("Source Files", CM_SOURCE_REGEX);
It doesn't seem possible right now to extend this source group definition for add additional file types (qml
.e.g.), without breaking the existing regex. This e.g. doesn't work:
source_group("Source Files" REGULAR_EXPRESSION .qml)
source_group("Source Files" REGULAR_EXPRESSION .foo)
source_group("Source Files" REGULAR_EXPRESSION .bar)
There doesn't seem to be any way to read an existing group, to possibly extending is manually either. That would of course be very fragile, as it would require parsing the regex.
The seemingly only way to work around this is to use the FILES
variant of source_group
for each individual file.