[llvm-commits] [llvm] r158046 - in /llvm/trunk: unittests/CMakeLists.txt utils/unittest/CMakeLists.txt
Justin Holewinski
jholewinski at nvidia.com
Tue Jun 5 20:11:20 PDT 2012
Author: jholewinski
Date: Tue Jun 5 22:11:20 2012
New Revision: 158046
URL: http://llvm.org/viewvc/llvm-project?rev=158046&view=rev
Log:
Fix gtest build issue on Visual Studio 2012 RC
Modified:
llvm/trunk/unittests/CMakeLists.txt
llvm/trunk/utils/unittest/CMakeLists.txt
Modified: llvm/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CMakeLists.txt?rev=158046&r1=158045&r2=158046&view=diff
==============================================================================
--- llvm/trunk/unittests/CMakeLists.txt (original)
+++ llvm/trunk/unittests/CMakeLists.txt Tue Jun 5 22:11:20 2012
@@ -15,6 +15,12 @@
set_target_properties(${test_name}Tests PROPERTIES FOLDER "Tests")
endfunction()
+# 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 ()
+
add_custom_target(UnitTests)
set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
Modified: llvm/trunk/utils/unittest/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/CMakeLists.txt?rev=158046&r1=158045&r2=158046&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/CMakeLists.txt (original)
+++ llvm/trunk/utils/unittest/CMakeLists.txt Tue Jun 5 22:11:20 2012
@@ -27,6 +27,12 @@
set(LLVM_REQUIRES_RTTI 1)
add_definitions( -DGTEST_HAS_RTTI=0 )
+# 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 ()
+
add_llvm_library(gtest
googletest/gtest.cc
googletest/gtest-death-test.cc
More information about the llvm-commits
mailing list