Revert r229185, "Raising minimum required Visual Studio version to 2013."
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 14 Feb 2015 00:45:32 +0000 (00:45 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 14 Feb 2015 00:45:32 +0000 (00:45 +0000)
All builders are not ready yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229199 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
cmake/modules/AddLLVM.cmake
utils/unittest/CMakeLists.txt

index 4f00395fd60be8e726251724309f2b75f9d54f3e..afcc9f0ce2ab42b4a46aec09beb9fe9b7d82285a 100644 (file)
@@ -24,10 +24,6 @@ endif()
 
 project(LLVM)
 
-if (MSVC AND MSVC_VERSION LESS 1800)
-  message(FATAL_ERROR "Minimum required MSVC version is 2013!")
-endif ()
-
 # The following only works with the Ninja generator in CMake >= 3.0.
 set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
   "Define the maximum number of concurrent compilation jobs.")
index b265d8661a7e104ca14983613b36ff2297b74c14..dae8e758c7cfbb922d3649e0c3ac4db678e407b5 100644 (file)
@@ -584,6 +584,12 @@ function(add_unittest test_suite test_name)
     set(EXCLUDE_FROM_ALL ON)
   endif()
 
+  # Visual Studio 2012 only supports up to 8 template parameters in
+  # std::tr1::tuple by default, but gtest requires 10
+  if (MSVC AND MSVC_VERSION EQUAL 1700)
+    list(APPEND LLVM_COMPILE_DEFINITIONS _VARIADIC_MAX=10)
+  endif ()
+
   include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
   if (NOT LLVM_ENABLE_THREADS)
     list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0)
index b34e22ae0cb42258f9096f675c49d8efc96134f7..7ac894dff14f3e7d5e99a134e5d84c1175ef4164 100644 (file)
@@ -32,6 +32,12 @@ if (NOT LLVM_ENABLE_THREADS)
   add_definitions( -DGTEST_HAS_PTHREAD=0 )
 endif()
 
+# Visual Studio 2012 only supports up to 8 template parameters in
+# std::tr1::tuple by default, but gtest requires 10
+if(MSVC AND MSVC_VERSION EQUAL 1700)
+  add_definitions(-D_VARIADIC_MAX=10)
+endif ()
+
 set(LIBS
   LLVMSupport # Depends on llvm::raw_ostream
 )