[CMake] how-to get cmake command line after running ccmake

Adolfo Rodríguez dofo79 at gmail.com
Thu Apr 2 03:26:19 EDT 2009


If you do create this script, would you mind sharing it in this list?. I
think it may come in handy to many of us at one time or another.

Thanks in advance!

Adolfo

On Wed, Apr 1, 2009 at 11:06 PM, Darren Weber
<darren.weber.lists at gmail.com>wrote:

>
> Yes, this is the feature that I'm looking for.  I want to use ccmake for
> the initial configuration and then automatically "translate" that
> configuration into an equivalent command line for cmake (all on *nix
> system), which I can then put into an automated build script (sh or bash)
> that I can run on other systems (via ssh or whatever).
>
>
> I'll try your diff suggestion James.
>
> Thanks, Darren
>
>
>
> On Mon, Mar 30, 2009 at 9:23 PM, James Bigler <jamesbigler at gmail.com>wrote:
>
>> On Mon, Mar 30, 2009 at 9:27 PM, Philip Lowman <philip at yhbt.com> wrote:
>>
>>> On Mon, Mar 30, 2009 at 4:09 PM, Darren Weber <
>>> darren.weber.lists at gmail.com> wrote:
>>>
>>>>
>>>> Can we automatically extract an equivalent cmake command line after
>>>> running ccmake?
>>>>
>>>> Take care, Darren
>>>
>>>
>>> If you're using the Makefile generator you can simply type "make
>>> edit_cache" in your build tree after you've initially generated.
>>>
>>> If this doesn't solve your problem you likely can look towards finding
>>> the source directory in the CMakeCache.txt file.
>>>
>>
>> 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.
>>
>> I don't believe this feature exists, though you could get something close
>> by doing the following.
>>
>> 1. Create a build directory and run cmake <path to source>.  This is your
>> default configuration.
>> 2. Copy CMakeCache.txt some where safe.
>> 3. Configure you system with ccmake.
>> 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).
>>
>> James
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Adolfo Rodríguez Tsouroukdissian

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090402/ce10294f/attachment.htm>


More information about the CMake mailing list