blob: a597a3524a7be9e66996dab6f4c4a34aade9016a [file] [log] [blame]
Chandler Carruth94d02512012-06-21 09:51:26 +00001set(LLVM_LINK_COMPONENTS
NAKAMURA Takumib5c4b8762013-12-10 11:13:32 +00002 Analysis
3 AsmParser
4 Core
5 IPA
6 Support
Chandler Carruth94d02512012-06-21 09:51:26 +00007 )
8
Chandler Carruth74b6a772013-01-07 15:35:46 +00009set(IRSources
Benjamin Kramer410780b2013-01-12 14:13:45 +000010 AttributesTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000011 ConstantsTest.cpp
12 DominatorTreeTest.cpp
Chandler Carruthebabadf2012-07-16 07:44:45 +000013 IRBuilderTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000014 InstructionsTest.cpp
Chandler Carruth7caea412013-11-09 12:26:54 +000015 LegacyPassManagerTest.cpp
Chandler Carruthec7ad652012-07-15 23:26:50 +000016 MDBuilderTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000017 MetadataTest.cpp
Chandler Carruth90a835d2013-11-09 13:09:08 +000018 PassManagerTest.cpp
Arnold Schwaighofereb4f2d62013-05-05 02:14:28 +000019 PatternMatch.cpp
Chandler Carruth36e2ecf2012-07-15 23:45:24 +000020 TypeBuilderTest.cpp
Benjamin Kramer6d29c292012-08-04 09:52:39 +000021 TypesTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000022 ValueMapTest.cpp
Benjamin Kramereee73f52013-04-12 08:33:11 +000023 ValueTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000024 VerifierTest.cpp
Gabor Greiffea6a552012-11-12 10:01:17 +000025 WaymarkTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000026 )
27
28# MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
29# See issue#331418 in Visual Studio.
30if(MSVC AND MSVC_VERSION LESS 1600)
Chandler Carruth74b6a772013-01-07 15:35:46 +000031 list(REMOVE_ITEM IRSources ValueMapTest.cpp)
Chandler Carruth94d02512012-06-21 09:51:26 +000032endif()
33
NAKAMURA Takumie14e13d2012-06-21 22:17:39 +000034# HACK: Declare a couple of source files as optionally compiled to satisfy the
35# missing-file-checker in LLVM's weird CMake build.
36set(LLVM_OPTIONAL_SOURCES
37 ValueMapTest.cpp
38 )
39
Chandler Carruth74b6a772013-01-07 15:35:46 +000040add_llvm_unittest(IRTests
41 ${IRSources}
Chandler Carruth94d02512012-06-21 09:51:26 +000042 )