[CMake] Running cmake multiple times to resolve cache variables

Luke Kucalaba lkucalaba at dsci.com
Fri Oct 10 10:51:13 EDT 2008


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?

 

Currently, the output always looks like this:

-- Configuring done

-- Generating done

-- Build files have been written to:
N:/dsci/repo/WMI/tests/CMakeTest/msvc71

 

How difficult would it be to put a warning message like "X cache
variables are still unresolved.  Running cmake again may resolve these
variables."

 

-- Configuring done

-- Generating done

-- WARNING: 123 cache variables are still unresolved, recommend running
CMake again to resolve

 

Does anyone else think this would be a useful feature to add?  Should I
make a feature request in Mantis? 

 

Luke

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081010/58add7a7/attachment.htm>


More information about the CMake mailing list