0

cmake can get -D options to create cache entries. However, my option lists are too long. Is there a better way to just read a file with <var>:<type>=<value> entries?

The other post is asking for something completely different: they want all generated config entries be stored and loaded. Thus cmake -LA will export and cmake -C will load all automatically generated cache entries which is NOT what I want.

I only want to import the -D options which can override or provide input to the CMakeLists.txt but let the rest entries automatically generated.

Wang
  • 7,250
  • 4
  • 35
  • 66
  • this is probably not the duplicate. `cmake -C` will store/load all automatically generated cache entries which is NOT what I want. I only want to import the `-D` options which can override the `CMakeLists.txt` but let the rest entries automatically generated. – Wang Nov 28 '17 at 21:24
  • 1
    No, I think that's exactly what want. It loads a file with pre-sets, that you can even use across all your projects (e.g. library installation paths, installation prefix, etc.). The linked answer just additionally discusses the possibility to convert an existing project's settings into a pre-loadable settings file. – Florian Nov 29 '17 at 08:14

0 Answers0