<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
William A. Hoffman wrote:
<blockquote
 cite="mid6.2.0.14.2.20060528212227.0a189788@pop.nycap.rr.com"
 type="cite">
  <pre wrap="">At 07:43 PM 5/28/2006, Brandon J. Van Every wrote:


  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">That is where it gets hard, because cmake has to be
run before you can figure out what the options are.   That is why I suggested creating
an options file.  It is not perfect because it could get out of date with the true
options for the project.   But, it would give people a way to document a project and
have a better command line.

cmake --help ../path/to/source
This would read CMakeCommandLineOptions.cmake, and print out the options found in the
file.
 
      </pre>
    </blockquote>
    <pre wrap="">What is the motive for making it separate from CMakeLists.txt?
    </pre>
  </blockquote>
  <pre wrap=""><!---->Because you have to parse the entire CMakeLists.txt tree, create a CMakeCache
before you could implement --help.  </pre>
</blockquote>
<br>
Why can't you just have a command line options section in
CMakeLists.txt that gets a "privileged" parse?&nbsp; The parser would just
look for that section before looking for anything else.&nbsp; I am assuming
that the CMakeLists.txt author is going to specify command line
options, and would rather write everything inside of CMakeLists.txt,
rather than write 2 files.&nbsp; But perhaps your intent is that
CMakeCommandLineOptions.cmake is generated, which would make it a moot
point.<br>
<br>
I think if you made the command line options static or "constantized,"
a lot of these issues go away.&nbsp; Most of the problems seem to arise from
a perceived need to allow all kinds of dynamic flexibility in how
command line options are generated.&nbsp; If you make 'em just spell 'em out
statically, exactly as they're gonna be, then things should work fine.&nbsp;
Just don't allow dynamically generated command line options.<br>
<br>
<blockquote
 cite="mid6.2.0.14.2.20060528212227.0a189788@pop.nycap.rr.com"
 type="cite">
  <pre wrap="">And, even then, there is currently no way
to map a cmake variable like CMAKE_INSTALL_PREFIX to some command line option
like --prefix.

  </pre>
</blockquote>
CMake parses command line options already... what is difficult about
adding more of them?<br>
<br>
<br>
Cheers,<br>
Brandon Van Every<br>
<br>
<br>
</body>
</html>