blob: fd0831f8e1fa1100f1c7919fce7824806ef0e5cc [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 Carruth7caea412013-11-09 12:26:54 +000013 LegacyPassManagerTest.cpp
Chandler Carruthec7ad652012-07-15 23:26:50 +000014 MDBuilderTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000015 MetadataTest.cpp
Chandler Carruth90a835d2013-11-09 13:09:08 +000016 PassManagerTest.cpp
Arnold Schwaighofereb4f2d62013-05-05 02:14:28 +000017 PatternMatch.cpp
Chandler Carruth36e2ecf2012-07-15 23:45:24 +000018 TypeBuilderTest.cpp
Benjamin Kramer6d29c292012-08-04 09:52:39 +000019 TypesTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000020 ValueMapTest.cpp
Benjamin Kramereee73f52013-04-12 08:33:11 +000021 ValueTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000022 VerifierTest.cpp
Gabor Greiffea6a552012-11-12 10:01:17 +000023 WaymarkTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000024 )
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)
Chandler Carruth74b6a772013-01-07 15:35:46 +000029 list(REMOVE_ITEM IRSources ValueMapTest.cpp)
Chandler Carruth94d02512012-06-21 09:51:26 +000030endif()
31
NAKAMURA Takumie14e13d2012-06-21 22:17:39 +000032# 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
Chandler Carruth74b6a772013-01-07 15:35:46 +000038add_llvm_unittest(IRTests
39 ${IRSources}
Chandler Carruth94d02512012-06-21 09:51:26 +000040 )