[llvm-commits] [llvm] r143898 - /llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake

NAKAMURA Takumi geek4civic at gmail.com
Sun Nov 6 15:37:22 PST 2011


Author: chapuni
Date: Sun Nov  6 17:37:22 2011
New Revision: 143898

URL: http://llvm.org/viewvc/llvm-project?rev=143898&view=rev
Log:
Fix CRT selection logic when using CMake NMake generator.

CMAKE_CONFIGURATION_TYPES is only set on Visual Studio generators.  For NMake CMAKE_BUILD_TYPE is used instead.

Patch by EJose Fonseca!

Modified:
    llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake

Modified: llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake?rev=143898&r1=143897&r2=143898&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake (original)
+++ llvm/trunk/cmake/modules/ChooseMSVCCRT.cmake Sun Nov  6 17:37:22 2011
@@ -60,7 +60,7 @@
 
   make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT})
 
-  foreach(build_type ${CMAKE_CONFIGURATION_TYPES})
+  foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})
     string(TOUPPER "${build_type}" build)
     if (NOT LLVM_USE_CRT_${build})
       get_current_crt(LLVM_USE_CRT_${build}
@@ -75,7 +75,7 @@
     endif(NOT LLVM_USE_CRT_${build})
   endforeach(build_type)
 
-  foreach(build_type ${CMAKE_CONFIGURATION_TYPES})
+  foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})
     string(TOUPPER "${build_type}" build)
     if ("${LLVM_USE_CRT_${build}}" STREQUAL "")
       set(flag_string " ")





More information about the llvm-commits mailing list