[CMake] Running cmake multiple times to resolve cache variables

Bill Hoffman bill.hoffman at kitware.com
Fri Oct 10 11:12:02 EDT 2008


Luke Kucalaba wrote:
> I have a question about knowing when you have run cmake enough times to 
> resolve all the cache variables for a project.  In the CMake explanation 
> on the main website, regarding generation using the cmake.exe program 
> from the command-line in non-interactive mode, it says “It can be 
> difficult to know when to stop the run cmake, edit the cache file cycle 
> without the aid of an interface.”  Yet when you run the interactive 
> version of cmake (CMakeSetup or ccmake), the program detects when you 
> have resolved all cache variables (for example, CMakeSetup uses 
> color-coding, red=not resolved, gray=resolved), and will not even let 
> you generate projects/makefiles until all cache variables are resolved 
> (grayed).  Why hasn’t this detection capability been added to cmake.exe 
> for non-interactive mode?  And why does the cmake.exe in non-interactive 
> mode generate “intermediate” build files that are not “fully generated” 
> because you haven’t yet resolved all the cache variables, yet the 
> interactive versions don’t even generate build files until the very 
> final step?
> 
>  

Not sure this makes sense.   The new variables show up in the cache with 
a default value.   Since you are running from the command line there is 
no way to change the default value, so there is no reason to run cmake 
again (nothing is going to change.).  With the gui's the user is 
presented with new cache values and given the chance to change them.

-Bill


More information about the CMake mailing list