llvm/unittests/VMCore/CMakeLists.txt: Introduce LLVM_OPTIONAL_SOURCES here, too.
[oota-llvm.git] / unittests / VMCore / CMakeLists.txt
1 set(LLVM_LINK_COMPONENTS
2   asmparser
3   analysis
4   core
5   ipa
6   target
7   )
8
9 set(VMCoreSources
10   ConstantsTest.cpp
11   DominatorTreeTest.cpp
12   InstructionsTest.cpp
13   MetadataTest.cpp
14   PassManagerTest.cpp
15   ValueMapTest.cpp
16   VerifierTest.cpp
17   )
18
19 # MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
20 # See issue#331418 in Visual Studio.
21 if(MSVC AND MSVC_VERSION LESS 1600)
22   list(REMOVE_ITEM VMCoreSources ValueMapTest.cpp)
23 endif()
24
25 # HACK: Declare a couple of source files as optionally compiled to satisfy the
26 # missing-file-checker in LLVM's weird CMake build.
27 set(LLVM_OPTIONAL_SOURCES
28   ValueMapTest.cpp
29   )
30
31 add_llvm_unittest(VMCoreTests
32   ${VMCoreSources}
33   )