diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2014-09-15 11:33:50 +0000 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2014-09-15 11:33:50 +0000 |
commit | 1c4db80df7a79ecdd368cf36dbbe123173d6a1fd (patch) | |
tree | c7b92c1d36643288e141fbd37ee8198ac6e42c97 /cmake | |
parent | 18de2fce24074d26d6115eb93e22db77d16aa4c2 (diff) | |
download | compiler-rt-1c4db80df7a79ecdd368cf36dbbe123173d6a1fd.tar.gz |
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index 0f6260ae5..31bfa2221 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -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, |