[CMake-Promote] a ./configure shell script stub

William A. Hoffman billlist at nycap.rr.com
Mon May 29 10:23:01 EDT 2006


At this point I think email is just too difficult to explain the problem as I
have tried several times.   I will try one more time after that, I may say,
if it is so easy you do it....


So, currently, cmake works like this, (and this is not easy to change)

1. you run cmake it processes all CMakeLists.txt files referenced from
the specified source tree.

2. it generates a CMakeCache.txt file in the binary tree specified. It also
generates all the build files at the same time.

3.  The CMakeCache.txt file contains all of the variables that are options for
the project.   These come from the OPTION command, or SET(VAR value CACHE)
commands.   Until cmake is run there is NO WAY to determine all of the options
for the project.   


To work with the options, it is best to use ccmake or CMakeSetup, or even
cmake -i.   To let people work from the command line we added the abilitiy
to use -DVAR=VALUE from the command line.  What this does is pre-load
the CMakeCache.txt with the VAR.   The VAR may or may not be even used in the
project, cmake does not care.   To implement --help correctly, you would have
to configure the entire project first.   My suggestion was to create an extra
file that could be parsed at --help time, it would be small and easy to parse,
and not require parsing the entire tree.   It would provide a map from VAR name
to --commandline name.  It would be read by cmake and allow the project to specify
its options in one place, and make it easier to implement --help, and add a way
to specify a mapping from --option to a VAR name.

Short of that maybe the answer is that we should have a GUI for UNIX.

-Bill



More information about the CMake-Promote mailing list