<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:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
.MsoPapDefault
        {mso-style-type:export-only;
        line-height:115%;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yes, because it doesn’t set any CMAKE_BUILD_TYPE by default, which is, IMO, just fine for VS.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">That’s what bit me an hour ago, had to re-configure manually with a random (from my perspective) CMAKE_BUILD_TYPE.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> NAKAMURA Takumi [mailto:geek4civic@gmail.com]
<br>
<b>Sent:</b> Tuesday, August 11, 2015 11:37<br>
<b>To:</b> Kuperstein, Michael M; Yaron Keren<br>
<b>Cc:</b> llvm-commits@lists.llvm.org<br>
<b>Subject:</b> Re: [llvm] r244406 - cmake: Error on invalid CMAKE_BUILD_TYPE<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="line-height:115%">FYI, a failing build; <a href="http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/475">http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/475</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="line-height:115%"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="line-height:115%">On Tue, Aug 11, 2015 at 5:19 PM Kuperstein, Michael M via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I agree it’s very slow, but it’s still a valid configuration - especially when debugging tablegen
 itself. :-)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Whether LLVM_OPTIMIZED_TABLEGEN should be the default is a separate question.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a name="msg-f:1509195668862102604__MailEndCompos"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Yaron Keren [mailto:<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, August 11, 2015 11:04<br>
<b>To:</b> Kuperstein, Michael M<br>
<b>Cc:</b> Justin Bogner; <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">
llvm-commits@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm] r244406 - cmake: Error on invalid CMAKE_BUILD_TYPE</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:115%">
It errors when the build is not one of the known:<span style="font-size:9.5pt;line-height:115%">Debug|Release|RelWithDebInfo|MinSizeRel.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:115%">
<span style="font-size:9.5pt;line-height:115%">An invalid argument is always an error and without this patch the build just goes on.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:115%">
 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:115%">
<span style="font-size:9.5pt;line-height:115%">For Visual C++ you don't have to specify CMAKE_BUILD_TYPE as CMAKE creates a multi solution but it still significant. Without CMAKE_BUILD_TYPE and without LLVM_OPTIMIZED_TABLEGEN, tablegen will be built in Debug
 config which is really slow. </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:115%">
 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:115%">
 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;line-height:115%;direction:rtl;unicode-bidi:embed">
<span dir="LTR"> <o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:115%">
2015-08-11 10:43 GMT+03:00 Kuperstein, Michael M via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>>:<span lang="HE" dir="RTL"><o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;line-height:115%;direction:rtl;unicode-bidi:embed">
<span dir="LTR">Hi Justin</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>,<br>
<br>
</span><span dir="LTR">I'm not sure erroring out makes sense when generating for Visual Studio (since the solution is always generated with all build types</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>).<br>
</span><span dir="LTR">Perhaps disable it for VS</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>?<br>
<br>
</span><span dir="LTR">Thanks</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>,<br>
  </span><span dir="LTR">Michael</span><span lang="HE"><br>
<br>
-----</span><span dir="LTR">Original Message</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>-----<br>
</span><span dir="LTR">From: llvm-commits [mailto</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>:<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank"><span lang="EN-US" dir="LTR">llvm-commits-bounces@lists.llvm.org</span></a><span dir="RTL"></span><span dir="RTL"></span>]
</span><span dir="LTR">On Behalf Of Justin Bogner via llvm-commits</span><span lang="HE"><br>
</span><span dir="LTR">Sent: Sunday, August 09, 2015 00:05</span><span lang="HE"><br>
</span><span dir="LTR">To</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>:
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank"><span lang="EN-US" dir="LTR">llvm-commits@lists.llvm.org</span></a><br>
</span><span dir="LTR">Subject: [llvm] r244406 - cmake: Error on invalid CMAKE_BUILD_TYPE</span><span lang="HE"><br>
<br>
</span><span dir="LTR">Author: bogner</span><span lang="HE"><br>
</span><span dir="LTR">Date: Sat Aug</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>  8 16:04:45 2015<br>
</span><span dir="LTR">New Revision: 244406</span><span lang="HE"><br>
<br>
</span><span dir="LTR">URL</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>:
<a href="http://llvm.org/viewvc/llvm-project?rev=244406&view=rev" target="_blank">
<span lang="EN-US" dir="LTR">http://llvm.org/viewvc/llvm-project?rev=244406</span><span dir="RTL"></span><span dir="RTL"></span>&<span lang="EN-US" dir="LTR">view=rev</span></a><br>
</span><span dir="LTR">Log</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>:<br>
</span><span dir="LTR">cmake: Error on invalid CMAKE_BUILD_TYPE</span><span lang="HE"><br>
<br>
</span><span dir="LTR">Apparently if you make a typo in the argument to CMAKE_BUILD_TYPE, cmake silently accepts this but doesn't apply any particular build type to your build. This means you get a build that doesn't really make any sense - it's sort of a debug
 build with asserts disabled</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>.<br>
<br>
</span><span dir="LTR">Error out instead</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>.<br>
<br>
</span><span dir="LTR">Modified</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>:<br>
    </span><span dir="LTR">llvm/trunk/CMakeLists.txt</span><span lang="HE"><br>
<br>
</span><span dir="LTR">Modified: llvm/trunk/CMakeLists.txt</span><span lang="HE"><br>
</span><span dir="LTR">URL</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>:
<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=244406&r1=244405&r2=244406&view=diff" target="_blank">
<span lang="EN-US" dir="LTR">http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=244406</span><span dir="RTL"></span><span dir="RTL"></span>&<span lang="EN-US" dir="LTR">r1=244405</span><span dir="RTL"></span><span dir="RTL"></span>&<span lang="EN-US" dir="LTR">r2=244406</span><span dir="RTL"></span><span dir="RTL"></span>&<span lang="EN-US" dir="LTR">view=diff</span></a><br>
==============================================================================<br>
--- </span><span dir="LTR">llvm/trunk/CMakeLists.txt (original</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>)<br>
+++ </span><span dir="LTR">llvm/trunk/CMakeLists.txt Sat Aug</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>  8 16:04:45 2015<br>
@@ -7,6 +7,11 @@ </span><span dir="LTR">if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C</span><span lang="HE"><br>
   </span><span dir="LTR">set(CMAKE_BUILD_TYPE</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span> "</span><span dir="LTR">Debug</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>")<br>
 </span><span dir="LTR">endif</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>()<br>
<br>
+</span><span dir="LTR">if (CMAKE_BUILD_TYPE AND</span><span lang="HE"><br>
+    </span><span dir="LTR">NOT CMAKE_BUILD_TYPE MATCHES</span><span lang="HE"><br>
+"^(</span><span dir="LTR">Debug|Release|RelWithDebInfo|MinSizeRel</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>)$")<br>
+  </span><span dir="LTR">message(FATAL_ERROR</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span> "</span><span dir="LTR">Invalid value for CMAKE_BUILD_TYPE</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>:<br>
+${</span><span dir="LTR">CMAKE_BUILD_TYPE</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>}")<br>
+</span><span dir="LTR">endif</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>()<br>
+<br>
 </span><span dir="LTR">if(POLICY CMP0022</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>)<br>
   </span><span dir="LTR">cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required</span><span lang="HE"><br>
 </span><span dir="LTR">endif</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>()<br>
<br>
<br>
_______________________________________________<br>
</span><span dir="LTR">llvm-commits mailing list</span><span lang="HE"><br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank"><span lang="EN-US" dir="LTR">llvm-commits@lists.llvm.org</span></a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank"><span lang="EN-US" dir="LTR">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</span></a><br>
---------------------------------------------------------------------<br>
</span><span dir="LTR">Intel Israel (74) Limited</span><span lang="HE"><br>
<br>
</span><span dir="LTR">This e-mail and any attachments may contain confidential material for</span><span lang="HE"><br>
</span><span dir="LTR">the sole use of the intended recipient(s). Any review or distribution</span><span lang="HE"><br>
</span><span dir="LTR">by others is strictly prohibited. If you are not the intended</span><span lang="HE"><br>
</span><span dir="LTR">recipient, please contact the sender and delete all copies</span><span dir="RTL"></span><span lang="HE"><span dir="RTL"></span>.<br>
_______________________________________________<br>
</span><span dir="LTR">llvm-commits mailing list</span><span lang="HE"><br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank"><span lang="EN-US" dir="LTR">llvm-commits@lists.llvm.org</span></a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank"><span lang="EN-US" dir="LTR">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</span></a></span><span dir="LTR"><o:p></o:p></span></p>
</blockquote>
</div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;line-height:115%;direction:rtl;unicode-bidi:embed">
<span dir="RTL"></span><span lang="HE"><span dir="RTL"></span> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<div>
<p><span dir="LTR"></span><span dir="LTR"></span>---------------------------------------------------------------------<br>
Intel Israel (74) Limited<span lang="HE" dir="RTL"><o:p></o:p></span></p>
<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="line-height:115%">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
</blockquote>
</div>
</div>
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p></body>
</html>