blob: 4ff94f70355c5a3cb2f9816df93f1f10c9375c53 [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
Chandler Carruth94d02512012-06-21 09:51:26 +00008 ConstantsTest.cpp
9 DominatorTreeTest.cpp
Chandler Carruthebabadf2012-07-16 07:44:45 +000010 IRBuilderTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000011 InstructionsTest.cpp
Chandler Carruthec7ad652012-07-15 23:26:50 +000012 MDBuilderTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000013 MetadataTest.cpp
14 PassManagerTest.cpp
Chandler Carruth36e2ecf2012-07-15 23:45:24 +000015 TypeBuilderTest.cpp
Benjamin Kramer6d29c292012-08-04 09:52:39 +000016 TypesTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000017 ValueMapTest.cpp
18 VerifierTest.cpp
Gabor Greiffea6a552012-11-12 10:01:17 +000019 WaymarkTest.cpp
Chandler Carruth94d02512012-06-21 09:51:26 +000020 )
21
22# MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
23# See issue#331418 in Visual Studio.
24if(MSVC AND MSVC_VERSION LESS 1600)
Chandler Carruth74b6a772013-01-07 15:35:46 +000025 list(REMOVE_ITEM IRSources ValueMapTest.cpp)
Chandler Carruth94d02512012-06-21 09:51:26 +000026endif()
27
NAKAMURA Takumie14e13d2012-06-21 22:17:39 +000028# HACK: Declare a couple of source files as optionally compiled to satisfy the
29# missing-file-checker in LLVM's weird CMake build.
30set(LLVM_OPTIONAL_SOURCES
31 ValueMapTest.cpp
32 )
33
Chandler Carruth74b6a772013-01-07 15:35:46 +000034add_llvm_unittest(IRTests
35 ${IRSources}
Chandler Carruth94d02512012-06-21 09:51:26 +000036 )