1set(LLVM_LINK_COMPONENTS 2 asmparser 3 core 4 ipa 5 ) 6 7set(IRSources 8 AttributesTest.cpp 9 ConstantsTest.cpp 10 DominatorTreeTest.cpp 11 IRBuilderTest.cpp 12 InstructionsTest.cpp 13 LegacyPassManagerTest.cpp 14 MDBuilderTest.cpp 15 MetadataTest.cpp 16 PassManagerTest.cpp 17 PatternMatch.cpp 18 TypeBuilderTest.cpp 19 TypesTest.cpp 20 ValueMapTest.cpp 21 ValueTest.cpp 22 VerifierTest.cpp 23 WaymarkTest.cpp 24 ) 25 26# MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug. 27# See issue#331418 in Visual Studio. 28if(MSVC AND MSVC_VERSION LESS 1600) 29 list(REMOVE_ITEM IRSources ValueMapTest.cpp) 30endif() 31 32# HACK: Declare a couple of source files as optionally compiled to satisfy the 33# missing-file-checker in LLVM's weird CMake build. 34set(LLVM_OPTIONAL_SOURCES 35 ValueMapTest.cpp 36 ) 37 38add_llvm_unittest(IRTests 39 ${IRSources} 40 ) 41