<div class="gmail_quote">On Tue, Mar 31, 2009 at 12:23 AM, James Bigler <span dir="ltr"><<a href="mailto:jamesbigler@gmail.com">jamesbigler@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think he wants to run ccmake and configure things how he likes and then get a command line that would produce the equivalent configuration without ccmake (i.e. cmake -DSOMEVAR:BOOL=ON -DPATH_TO_SOME_EXE:PATH=/path/to/some.exe). This way, he can configure a new build in one easy step.<br>
<br>I don't believe this feature exists, though you could get something close by doing the following.<br><br>1. Create a build directory and run cmake <path to source>. This is your default configuration.<br>2. Copy CMakeCache.txt some where safe.<br>
3. Configure you system with ccmake.<br>4. Diff the old CMakeCache.txt and the new CMakeCache.txt. The differences should show you a superset of the options you will need (depending on if some options are automatically generated when you turn others on).</blockquote>
<div><br>You could create a separate file by hand and then include it with INCLUDE( ... OPTIONAL)<br><br>initialize_cache.cmake:<br>set(SOMEVAR ON CACHE BOOL "")<br>set(PATH_TO_SOME_EXE /path/to/some.exe CACHE PATH "")<br>
<br>I'm assuming here that you're not OK with simply using "cmake" to define all of your variables and then dump the resulting command (run as "cmake" "ccmake" or "cmake-gui") manually into a shell script.<br>
<br>i.e. if this works<br>$ cmake -DSOMEVAR:BOOL=ON -DPATH_TO_SOME_EXE:PATH=/path/to/some.exe ..<br>run this...<br>$ echo ccmake -DSOMEVAR:BOOL=ON -DPATH_TO_SOME_EXE:PATH=/path/to/some.exe .. > ~/my_cmake_start_script.sh<br>
<br>-- <br></div></div>Philip Lowman<br>