[compiler-rt] r217762 - Port the variadic std::tr1::tuple hack for building gtest for MSVC2012 to ASAN tests.

Ehsan Akhgari ehsan.akhgari at gmail.com
Mon Sep 15 04:33:50 PDT 2014


Author: ehsan
Date: Mon Sep 15 06:33:50 2014
New Revision: 217762

URL: http://llvm.org/viewvc/llvm-project?rev=217762&view=rev
Log:
Port the variadic std::tr1::tuple hack for building gtest for MSVC2012 to ASAN tests.

Summary: This is copied from llvm/utils/unittest/CMakeLists.txt.

Test Plan: This partly enables building ASAN tests with MSVC2012.

Reviewers: timurrrr

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5342

Modified:
    compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake

Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=217762&r1=217761&r2=217762&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Mon Sep 15 06:33:50 2014
@@ -138,6 +138,12 @@ if(MSVC)
 
   # gtest use a lot of stuff marked as deprecated on Windows.
   list(APPEND COMPILER_RT_GTEST_CFLAGS -Wno-deprecated-declarations)
+
+  # Visual Studio 2012 only supports up to 8 template parameters in
+  # std::tr1::tuple by default, but gtest requires 10
+  if(MSVC_VERSION EQUAL 1700)
+    add_definitions(-D_VARIADIC_MAX=10)
+  endif()
 endif()
 
 # Link objects into a single executable with COMPILER_RT_TEST_COMPILER,





More information about the llvm-commits mailing list