OSDN Git Service

ADTTests: [CMake] Exclude DenseMapTest.cpp and SmallVectorTest.cpp on MSVC9 due to...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 30 Aug 2012 16:22:32 +0000 (16:22 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 30 Aug 2012 16:22:32 +0000 (16:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162918 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ADT/CMakeLists.txt

index d272b09..cb9a909 100644 (file)
@@ -2,7 +2,7 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
-add_llvm_unittest(ADTTests
+set(ADTSources
   APFloatTest.cpp
   APIntTest.cpp
   BitVectorTest.cpp
@@ -31,3 +31,16 @@ add_llvm_unittest(ADTTests
   TwineTest.cpp
   VariadicFunctionTest.cpp
  )
+
+# They cannot be compiled on MSVC9 due to its bug.
+if(MSVC AND MSVC_VERSION LESS 1600)
+  set(LLVM_OPTIONAL_SOURCES
+    DenseMapTest.cpp
+    SmallVectorTest.cpp
+    )
+  list(REMOVE_ITEM ADTSources ${LLVM_OPTIONAL_SOURCES})
+endif()
+
+add_llvm_unittest(ADTTests
+  ${ADTSources}
+  )