<div dir="rtl"><div dir="ltr">It errors when the build is not one of the known:<span style="font-size:12.8000001907349px">Debug|Release|</span><span style="font-size:12.8000001907349px">RelWithDebInfo|MinSizeRel.</span></div><div dir="ltr"><span style="font-size:12.8000001907349px">An invalid argument is always an error and w</span><span style="font-size:12.8000001907349px">ithout this patch the build just goes on.</span></div><div dir="ltr"><span style="font-size:12.8000001907349px"><br></span></div><div dir="ltr"><span style="font-size:12.8000001907349px">For Visual C++ you don't have to specify </span><span style="font-size:12.8000001907349px">CMAKE_BUILD_TYPE</span><span style="font-size:12.8000001907349px"> as CMAKE creates a multi solution but it still significant. Without </span><span style="font-size:12.8000001907349px">CMAKE_BUILD_TYPE</span><span style="font-size:12.8000001907349px"> </span><span style="font-size:12.8000001907349px">and without LLVM_OPTIMIZED_</span><span style="font-size:12.8000001907349px">TABLEGEN, tablegen will be built in Debug config which is really slow. </span></div><div dir="ltr"><span style="font-size:12.8000001907349px"><br></span></div><div dir="ltr"><span style="font-size:12.8000001907349px"><br></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-08-11 10:43 GMT+03:00 Kuperstein, Michael M via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Justin,<br>
<br>
I'm not sure erroring out makes sense when generating for Visual Studio (since the solution is always generated with all build types).<br>
Perhaps disable it for VS?<br>
<br>
Thanks,<br>
  Michael<br>
<br>
-----Original Message-----<br>
From: llvm-commits [mailto:<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@lists.llvm.org</a>] On Behalf Of Justin Bogner via llvm-commits<br>
Sent: Sunday, August 09, 2015 00:05<br>
To: <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
Subject: [llvm] r244406 - cmake: Error on invalid CMAKE_BUILD_TYPE<br>
<br>
Author: bogner<br>
Date: Sat Aug  8 16:04:45 2015<br>
New Revision: 244406<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=244406&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=244406&view=rev</a><br>
Log:<br>
cmake: Error on invalid CMAKE_BUILD_TYPE<br>
<br>
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.<br>
<br>
Error out instead.<br>
<br>
Modified:<br>
    llvm/trunk/CMakeLists.txt<br>
<br>
Modified: llvm/trunk/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=244406&r1=244405&r2=244406&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=244406&r1=244405&r2=244406&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/CMakeLists.txt (original)<br>
+++ llvm/trunk/CMakeLists.txt Sat Aug  8 16:04:45 2015<br>
@@ -7,6 +7,11 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C<br>
   set(CMAKE_BUILD_TYPE "Debug")<br>
 endif()<br>
<br>
+if (CMAKE_BUILD_TYPE AND<br>
+    NOT CMAKE_BUILD_TYPE MATCHES<br>
+"^(Debug|Release|RelWithDebInfo|MinSizeRel)$")<br>
+  message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE:<br>
+${CMAKE_BUILD_TYPE}")<br>
+endif()<br>
+<br>
 if(POLICY CMP0022)<br>
   cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required<br>
 endif()<br>
<br>
<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
---------------------------------------------------------------------<br>
Intel Israel (74) Limited<br>
<br>
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.<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>