[CMake] is cmake -P script.cmake -DSOMEVAR=foo supposed to work?

Brandon J. Van Every bvanevery at gmail.com
Mon Jun 12 07:30:35 EDT 2006


Alexander Neundorf wrote:
>>   
>>     
>> You mean cmake -P myscript.cmake -DSOMEVAR=foo ?
>> This works, it is the 
>>     
>>> same as when you use -D when calling cmake to configure your project. It
>>> should really work.
>>>       
>> I use it this way and the only issues I had were with 
>>     
>>> spaces in the arguments, i.e. they have to be escaped properly.
>>>       
>>   
>> Last I read the archives, and last I checked it on the command line,this 
>> doesn't work in 2.4.2.  You sure you're not using a CVS CMake?
>>     
>
> Yes, sure.
> I'm using this since several months and I think most of the CheckFooExists.cmake modules use this too.
>   

Well it doesn't work on my Windows command prompt.  I thought it failed 
in 2.4.2 because a simple cmake -P script does not create a 
CMakeCache.txt, and -D was for modifying the cache.  Here's my test script:

MESSAGE("${DEPRESSING}")


and here's my command line:

E:\devel>cmake -P bwah.cmake -DDEPRESSING=killme


E:\devel>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060612/f726d77d/attachment.html


More information about the CMake mailing list