You cannot do the same thing with nmake. You must do it with cmake.<div><br></div><div>If you want to build multiple configurations in the same build tree, you must use the Visual Studio or Xcode generators. The nmake and other Makefile generators only support ONE CMAKE_BUILD_TYPE in a given build tree.</div>
<div><br></div><div>The way to do it with nmake is to have two separate build trees. One for Release and one for Debug. Then, in each of those directories, you may simply run "nmake". Switch from one directory to the other to change configurations with a make file generator.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br><br><div class="gmail_quote">On Fri, Feb 19, 2010 at 12:50 PM, Chauhan, Vikas <span dir="ltr"><<a href="mailto:vikas.chauhan@anritsu.com">vikas.chauhan@anritsu.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">My question has been stated in this post before, but I will repeat here<br>
for convenience:<br>
We have a way to build desired configuration using cmake (independent of<br>
what is present as default in cmakecache.txt):<br>
<div class="im">cmd> cmake --build .. --config= Release<br>
<br>
</div>I can choose different build config here at build time NOT at build<br>
generation time (and is independent of what is present in<br>
cmakecache.txt).<br>
<br>
However, this is with cmake. My question is that how do I do the same<br>
thing with nmake?<br>
<br>
Thanks,<br>
<font color="#888888">Vikas<br>
</font><div class="im"><br>
> -----Original Message-----<br>
> From: Tyler Roscoe [mailto:<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>]<br>
</div><div class="im">> Sent: 19 February 2010 16:09<br>
> To: Chauhan, Vikas<br>
</div><div><div></div><div class="h5">> Cc: <a href="mailto:cmake@cmake.org">cmake@cmake.org</a>; Bill Hoffman<br>
> Subject: Re: [CMake] nmake build with different options at command<br>
line<br>
><br>
> On Fri, Feb 19, 2010 at 08:03:59AM -0800, Tyler Roscoe wrote:<br>
> > On Fri, Feb 19, 2010 at 11:19:18AM -0000, Chauhan, Vikas wrote:<br>
> > > Thanks but what is the option when we use nmake to build?<br>
> ><br>
> > I don't understand your question.<br>
><br>
> Ok I'll take a stab.<br>
><br>
> Since CMAKE_BUILD_TYPE is a cache variable, you only have to specify<br>
the<br>
> -D flag once, when running cmake and populating your build directory<br>
for<br>
> the first time. Subsequent builds (make) will use this<br>
previously-cached<br>
> CMAKE_BUILD_TYPE and all your builds with that build directory will be<br>
> release builds.<br>
><br>
> tyler<br>
><br>
> > > > -----Original Message-----<br>
> > > > From: Tyler Roscoe [mailto:<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>]<br>
> > > > Sent: 18 February 2010 17:09<br>
> > > > To: Chauhan, Vikas<br>
> > > > Cc: Bill Hoffman; <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
> > > > Subject: Re: [CMake] nmake build with different options at<br>
command<br>
> > > line<br>
> > > ><br>
> > > > On Thu, Feb 18, 2010 at 05:07:37PM -0000, Chauhan, Vikas wrote:<br>
> > > > > Thanks but is it possible from command line.<br>
> > > ><br>
> > > > cmake -DCMAKE_BUILD_TYPE=release ...<br>
> > > ><br>
> > > > (I'm pretty sure -D args have to come before other arguments to<br>
> > > cmake.)<br>
> > > ><br>
> > > > tyler<br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>