cmake -C pre-load script alternative from CMakePresets.json

32 views Asked by At

When running cmake --help one possible option is

  -C <initial-cache>           = Pre-load a script to populate the cache.

this is great, since the script format specified is the same as CMakeLists.txt, allowing for fairly complex logic. If I'm instead invoking cmake with all options specified from CMakePresets.json file the best I can do is to simply list a cacheVariables field, without any dynamic capabilities.

Is there any way to specify a pre-load cache script from within a CMakePresets.json file?

0

There are 0 answers