<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Trebuchet MS";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-GB link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Thanks, I
understand it now.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Vikas<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
David Cole [mailto:david.cole@kitware.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 19 February 2010 18:12<br>
<b><span style='font-weight:bold'>To:</span></b> Chauhan, Vikas<br>
<b><span style='font-weight:bold'>Cc:</span></b> Tyler Roscoe; cmake@cmake.org;
Bill Hoffman<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [CMake] nmake build
with different options at command line</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>You cannot do the same thing with nmake. You must do it with cmake.<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>HTH,<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>David<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Fri, Feb 19, 2010 at 12:50 PM, Chauhan, Vikas <<a
href="mailto:vikas.chauhan@anritsu.com">vikas.chauhan@anritsu.com</a>>
wrote:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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):<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>cmd> cmake --build ..
--config= Release<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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"><span style='color:#888888'>Vikas</span></font><o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
> -----Original Message-----<br>
> From: Tyler Roscoe [mailto:<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>]<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>> Sent: 19 February 2010 16:09<br>
> To: Chauhan, Vikas<o:p></o:p></span></font></p>
</div>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>> 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>
> <st1:City w:st="on"><st1:place w:st="on">tyler</st1:place></st1:City><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>
> > > > <st1:City w:st="on"><st1:place w:st="on">tyler</st1:place></st1:City><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><o:p></o:p></span></font></p>
</div>
</div>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</div>
</div>
</body>
</html>