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

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jun 12 08:08:08 EDT 2006


> Von: "Brandon J. Van Every" <bvanevery at gmail.com>
> 
> 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 failedin
> 2.4.2 because a simple cmake -P script does not create aCMakeCache.txt,
> and 
> -D was for modifying the cache.  Here's my testscript:
> 
> MESSAGE("${DEPRESSING}")
> 
> and here's my command line:
> 
> E:\devel>cmake -P bwah.cmake -DDEPRESSING=killme
> 
> E:\devel>
> 

I wondered why it doesn't work for me neither, but...
try this:
> E:\devel>cmake -DDEPRESSING=killme -P bwah.cmake

Alex


-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


More information about the CMake mailing list