[llvm-commits] [PATCH] a cmake module patch to enable choose MSVC CRT using nmake generators

hume npx humeafo at gmail.com
Wed Feb 29 23:22:30 PST 2012


CMAKE_CONFIGURATION_TYPES is empty list when using nmake etc batch
generators, To enable choose MSVC CRT under batch build using nmake etc,we
need the following patch:

---------------------------------------------------------------------------------------------------------------------------------------


diff -Nur cmake_orig/modules/ChooseMSVCCRT.cmake
cmake/modules/ChooseMSVCCRT.cmake
--- cmake_orig/modules/ChooseMSVCCRT.cmake      2011-02-03 19:41:27 +0800
+++ cmake/modules/ChooseMSVCCRT.cmake   2012-03-01 15:15:03 +0800
@@ -59,6 +59,10 @@
   endif()

   make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT})
+
+  if(NOT CMAKE_CONFIGURATION_TYPES)
+    set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
+  endif()

   foreach(build_type ${CMAKE_CONFIGURATION_TYPES})
     string(TOUPPER "${build_type}" build)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120301/1c130a6a/attachment.html>


More information about the llvm-commits mailing list