diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt index 36aace5bc47a..1e8f25a5f0aa 100644 --- a/llvm/unittests/CMakeLists.txt +++ b/llvm/unittests/CMakeLists.txt @@ -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