[CMake] Making variables visible in ccmake

Dorier, Matthieu mdorier at anl.gov
Fri Sep 28 05:59:11 EDT 2018


Hi,


How do I make a variable visible in the ccmake tool?

For example I would like the user to be able to edit BOOST_ROOT when calling ccmake, how can I do that?


Right now all I see when first running ccmake is "EMPTY_CACHE", and when typing "c" to configure (which fails because some variables aren't properly set) then "e" to exit, I see the variables I have defined with "option", and I can toggle those, but I don't see other variables. I have tried the following:


if(NOT DEFINED BOOST_ROOT)
  set(BOOST_ROOT "/usr" CACHE PATH "Root of the Boost installation")
endif(NOT DEFINED BOOST_ROOT)


But I still don't see it in the list of variables.


Additionally, is there a way to have set of variables (namely the options, as well as things like BOOST_ROOT, CMAKE_CXX_COMPILER, CMAKE_C_COMPILER) show up when first calling ccmake, instead of EMPTY_CACHE?


Thanks,


Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180928/7d9401b0/attachment.html>


More information about the CMake mailing list