unittests/CMakeLists.txt: Suppress building ValueMapTest on MSVC older than 10(VS2010).
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 19 Nov 2010 03:19:32 +0000 (03:19 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 19 Nov 2010 03:19:32 +0000 (03:19 +0000)
MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
See issue#331418 in Visual Studio.

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

unittests/CMakeLists.txt

index 36aace5bc47add8a371b7f2d5efd8d6f15475f3c..1e8f25a5f0aa9f544377eeeb08d58623d01860c4 100644 (file)
@@ -74,7 +74,7 @@ add_llvm_unittest(Transforms
   Transforms/Utils/Cloning.cpp
   )
 
-add_llvm_unittest(VMCore
+set(VMCoreSources
   VMCore/ConstantsTest.cpp
   VMCore/DerivedTypesTest.cpp
   VMCore/InstructionsTest.cpp
@@ -84,6 +84,14 @@ add_llvm_unittest(VMCore
   VMCore/VerifierTest.cpp
   )
 
+# MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
+# See issue#331418 in Visual Studio.
+if(MSVC AND MSVC_VERSION LESS 1600)
+  list(REMOVE_ITEM VMCoreSources VMCore/ValueMapTest.cpp)
+endif()
+
+add_llvm_unittest(VMCore ${VMCoreSources})
+
 set(LLVM_LINK_COMPONENTS
   System
   Support