[CMake] Making variables visible in ccmake

Eric Noulard eric.noulard at gmail.com
Fri Sep 28 08:12:34 EDT 2018


Le ven. 28 sept. 2018 à 13:03, Dorier, Matthieu <mdorier at anl.gov> a écrit :

> Ah then maybe I don't understand correctly what is supposed to be
> displayed by ccmake.
>

My usage workflow, not sure it is the expected one but other CMake
users/developers may correct me if my usage is wrong.

1) Launch ccmake in an empty buiddir :
    ccmake -G Ninja /path/to/source

2) Hit 'c' once to populate the cache

3) hand edit needed var

4) Hit 'c' again and check result

5) Hit 'g'.

Then I may have forgotten to toggle an option so I :

1) Launch ccmake in the populated build dir:
    ccmake .

2) hand edit the forgotten vars

3) Hit 'c' then 'g'.



> In general, how can I have in the ccmake screen some variables displayed
> to configure some paths to some libraries?
>

You have to hit 'c' once to populate the cache and make ccmake/cmake-gui
aware of the defined (may be void) variables/

There was a "wizard" mode for cmake some time ago that was asking questions
for setting var values but it's gone:

$ cmake -i
The "cmake -i" wizard mode is no longer supported.
Use the -D option to set cache values on the command line.
Use cmake-gui or ccmake for an interactive dialog.


-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180928/8f8fa554/attachment.html>


More information about the CMake mailing list