0

Is there a way to export all the cmake configuration changes made in ccmake?

So if I call

ccmake <path-to-project>

and make a bunch of changes there, I'd like to have a way to export the delta between the default settings and the settings I ended up with, such that I can use them later with a plain cmake command like:

cmake -DPROJECT_OPTION1=On -DPROJECT_OPTION2=Off <path-to-project>

Essentially I'm looking for the same functionality available in cmake-gui described here export CMake variables from GUI to command line just for ccmake.

MikeMB
  • 20,029
  • 9
  • 57
  • 102
  • Isn't your question about the same as [this one](https://stackoverflow.com/questions/48993866/export-cmake-variables-from-gui-to-command-line)? – Tsyvarev Feb 26 '18 at 21:49
  • @Tsyvarev: That may be yes. Does the gui work on top of ccmake? – MikeMB Feb 26 '18 at 21:51
  • [ccmake](https://cmake.org/cmake/help/v3.0/manual/ccmake.1.html) itself provides a GUI. – Tsyvarev Feb 26 '18 at 21:53
  • @Tsyvarev: Yes, and thats what I'm using. But to determine if this question is a duplicate of the one you linked to I'd need to know if a solution that may come up there is also applicable to ccmake or vice versa, if there is no solution for [cmake-gui](https://cmake.org/cmake/help/v3.11/manual/cmake-gui.1.html) does that mean that there also isn't a solution for ccmake. – MikeMB Feb 26 '18 at 22:09
  • Actually, I just was curious about similar problem arising in 24 hours. (And with similar wording: you both don't note about "initial cache" file with variables settings, passed with `-C` option). I see, you have [answered](https://stackoverflow.com/a/48997981/3440745) to the question with similar problem. Don't you think the question is deserved to be noted in your one? – Tsyvarev Feb 26 '18 at 22:21
  • 1
    @Tsyvarev: Yeah, interesting coincidence. Before you mentioned it, I was simply not aware of it. Now that I am, I unfortunately don't see how it helps me. But I added a reference none the less. – MikeMB Feb 26 '18 at 22:32

0 Answers0