<div dir="ltr"><div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le ven. 28 sept. 2018 à 11:59, Dorier, Matthieu <<a href="mailto:mdorier@anl.gov">mdorier@anl.gov</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_5242358641958336421divtagdefaultwrapper" style="font-size:10pt;color:rgb(51,51,153);font-family:Tahoma,Geneva,sans-serif" dir="ltr">
<p style="margin-top:0px;margin-bottom:0px">Hi,</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">How do I make a variable visible in the ccmake tool?</p>
<p style="margin-top:0px;margin-bottom:0px">For example I would like the user to be able to edit BOOST_ROOT when calling ccmake, how can I do that?</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">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:</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px"></p>
<div>if(NOT DEFINED BOOST_ROOT)<br>
set(BOOST_ROOT "/usr" CACHE PATH "Root of the Boost installation")<br>
endif(NOT DEFINED BOOST_ROOT)</div>
<p></p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">But I still don't see it in the list of variables.</p></div></div></blockquote><div><br></div><div>CACHE variables are "Advanced Variables" which are not displayed unless you toggle display advanced var in either ccmake or cmake-gui.</div><div>In ccmake you have to hit 't' in order to see advanced variables.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_5242358641958336421divtagdefaultwrapper" style="font-size:10pt;color:rgb(51,51,153);font-family:Tahoma,Geneva,sans-serif" dir="ltr">
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">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?</p></div></div></blockquote><div><br></div><div>I don't know, CMAKE_<lang>_COMPILER is not meant to be set with cmake UI, they ought to be set in a toolchain or outside.</div><div>As noted in CMakeForceCompiler module you should not force them, use toolchain or env var before calling cmake* tool.</div><div><br></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div></div></div>