blob: b6098c79282c879c4abd95f30712dffe1fc9bae8 [file] [log] [blame]
Chandler Carruth94d02512012-06-21 09:51:26 +00001set(LLVM_LINK_COMPONENTS
2 asmparser
Chandler Carruth94d02512012-06-21 09:51:26 +00003 core
4 ipa
Chandler Carruth94d02512012-06-21 09:51:26 +00005 )
6
Chandler Carruth74b6a772013-01-07 15:35:46 +00007set(IRSources
Benjamin Kramer410780b2013-01-12 14:13:45 +00008 AttributesTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +00009 ConstantsTest.cpp
10 DominatorTreeTest.cpp
Chandler Carruthebabadf2012-07-16 07:44:45 +000011 IRBuilderTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000012 InstructionsTest.cpp
Chandler Carruthec7ad652012-07-15 23:26:50 +000013 MDBuilderTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000014 MetadataTest.cpp
15 PassManagerTest.cpp
Chandler Carruth36e2ecf2012-07-15 23:45:24 +000016 TypeBuilderTest.cpp
Benjamin Kramer6d29c292012-08-04 09:52:39 +000017 TypesTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000018 ValueMapTest.cpp
Benjamin Kramereee73f52013-04-12 08:33:11 +000019 ValueTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000020 VerifierTest.cpp
Gabor Greiffea6a552012-11-12 10:01:17 +000021 WaymarkTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000022 )
23
24# MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
25# See issue#331418 in Visual Studio.
26if(MSVC AND MSVC_VERSION LESS 1600)
Chandler Carruth74b6a772013-01-07 15:35:46 +000027 list(REMOVE_ITEM IRSources ValueMapTest.cpp)
Chandler Carruth94d02512012-06-21 09:51:26 +000028endif()
29
NAKAMURA Takumie14e13d2012-06-21 22:17:39 +000030# HACK: Declare a couple of source files as optionally compiled to satisfy the
31# missing-file-checker in LLVM's weird CMake build.
32set(LLVM_OPTIONAL_SOURCES
33 ValueMapTest.cpp
34 )
35
Chandler Carruth74b6a772013-01-07 15:35:46 +000036add_llvm_unittest(IRTests
37 ${IRSources}
Chandler Carruth94d02512012-06-21 09:51:26 +000038 )