I added an external project to my CMake file, and I wanted it to have the same set of configurations as the parent project. However, the generated project seems to have only one configuration - the default RelWithDebInfo. Here’s the code:
But the rest of options are set, so I’m sure that they are not entirely ignored. I assumed that external project should be built with the same set of configurations and currently selected configuration as the main project, but it’s not happening: if I change build type to Debug in Visual Studio, I get error error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|x64.
Quoting may also help to some extent; I’d try that with your minimum CMake and bump if that is more palatable to you (and it works on newer CMake versions).
prints =====> Debug|Release|MinSizeRel|RelWithDebInfo, so CONFIGS is now a corrected value, but ExternalProject is still generated with only RelWithDebInfo. Interestingly, the list of configurations ends up with “;” in “allegro_monolith_ext-cache-Debug.cmake” (the file used to populate CMake cache with CMAKE_CACHE_ARGS). And CMakeCache.txt still ends up with a single config.
I’m not sure LIST_SEPARATOR makes sense in context of CMAKE_CACHE_ARGS - it documented to work on command line arguments mostly. If I move DCMAKE_CONFIGURATION_TYPES to CMAKE_ARGS, it gets passed to CMake with escaped ‘;’ between configs, but they’re still ignored silently.