[CMake] nmake build with different options at command line

Chauhan, Vikas vikas.chauhan at anritsu.com
Fri Feb 19 12:50:02 EST 2010


My question has been stated in this post before, but I will repeat here
for convenience:
We have a way to build desired configuration using cmake (independent of
what is present as default in cmakecache.txt):
cmd> cmake --build .. --config= Release

I can choose different build config here at build time NOT at build
generation time (and is independent of what is present in
cmakecache.txt).

However, this is with cmake. My question is that how do I do the same
thing with nmake?

Thanks,
Vikas

> -----Original Message-----
> From: Tyler Roscoe [mailto:tyler at cryptio.net]
> Sent: 19 February 2010 16:09
> To: Chauhan, Vikas
> Cc: cmake at cmake.org; Bill Hoffman
> Subject: Re: [CMake] nmake build with different options at command
line
> 
> On Fri, Feb 19, 2010 at 08:03:59AM -0800, Tyler Roscoe wrote:
> > On Fri, Feb 19, 2010 at 11:19:18AM -0000, Chauhan, Vikas wrote:
> > > Thanks but what is the option when we use nmake to build?
> >
> > I don't understand your question.
> 
> Ok I'll take a stab.
> 
> Since CMAKE_BUILD_TYPE is a cache variable, you only have to specify
the
> -D flag once, when running cmake and populating your build directory
for
> the first time. Subsequent builds (make) will use this
previously-cached
> CMAKE_BUILD_TYPE and all your builds with that build directory will be
> release builds.
> 
> tyler
> 
> > > > -----Original Message-----
> > > > From: Tyler Roscoe [mailto:tyler at cryptio.net]
> > > > Sent: 18 February 2010 17:09
> > > > To: Chauhan, Vikas
> > > > Cc: Bill Hoffman; cmake at cmake.org
> > > > Subject: Re: [CMake] nmake build with different options at
command
> > > line
> > > >
> > > > On Thu, Feb 18, 2010 at 05:07:37PM -0000, Chauhan, Vikas wrote:
> > > > > Thanks but is it possible from command line.
> > > >
> > > > cmake -DCMAKE_BUILD_TYPE=release ...
> > > >
> > > > (I'm pretty sure -D args have to come before other arguments to
> > > cmake.)
> > > >
> > > > tyler
> > _______________________________________________
> > 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


More information about the CMake mailing list