summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2017-02-01 22:17:00 +0000
committerChris Bieneman <beanz@apple.com>2017-02-01 22:17:00 +0000
commit1751311a87abe02d4aee0a2a42ad053087c45c4f (patch)
tree4ea2a10fba08022b2018b479f48ee6f90bbe5887
parent00d4f49717744dcf120c0099310e5bba8188fb98 (diff)
downloadbcm5719-llvm-1751311a87abe02d4aee0a2a42ad053087c45c4f.tar.gz
bcm5719-llvm-1751311a87abe02d4aee0a2a42ad053087c45c4f.zip
[CMake] Update unit tests with accurate dependencies
This is extending the updates from r293696 to the LLDB unit tests. llvm-svn: 293821
-rw-r--r--lldb/unittests/Breakpoint/CMakeLists.txt6
-rw-r--r--lldb/unittests/CMakeLists.txt11
-rw-r--r--lldb/unittests/Core/CMakeLists.txt6
-rw-r--r--lldb/unittests/Editline/CMakeLists.txt5
-rw-r--r--lldb/unittests/Expression/CMakeLists.txt4
-rw-r--r--lldb/unittests/Host/CMakeLists.txt4
-rw-r--r--lldb/unittests/Interpreter/CMakeLists.txt3
-rw-r--r--lldb/unittests/Language/CPlusPlus/CMakeLists.txt3
-rw-r--r--lldb/unittests/Platform/CMakeLists.txt5
-rw-r--r--lldb/unittests/Process/gdb-remote/CMakeLists.txt9
-rw-r--r--lldb/unittests/Process/minidump/CMakeLists.txt9
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt9
-rw-r--r--lldb/unittests/Symbol/CMakeLists.txt4
-rw-r--r--lldb/unittests/SymbolFile/DWARF/CMakeLists.txt11
-rw-r--r--lldb/unittests/SymbolFile/PDB/CMakeLists.txt11
-rw-r--r--lldb/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt14
-rw-r--r--lldb/unittests/UnwindAssembly/x86/CMakeLists.txt7
-rw-r--r--lldb/unittests/Utility/CMakeLists.txt9
18 files changed, 125 insertions, 5 deletions
diff --git a/lldb/unittests/Breakpoint/CMakeLists.txt b/lldb/unittests/Breakpoint/CMakeLists.txt
index 5adaf9e78cf..3164af237a7 100644
--- a/lldb/unittests/Breakpoint/CMakeLists.txt
+++ b/lldb/unittests/Breakpoint/CMakeLists.txt
@@ -1,3 +1,9 @@
add_lldb_unittest(LLDBBreakpointTests
BreakpointIDTest.cpp
+
+ LINK_LIBS
+ lldbBreakpoint
+ lldbCore
+ LINK_COMPONENTS
+ Support
)
diff --git a/lldb/unittests/CMakeLists.txt b/lldb/unittests/CMakeLists.txt
index 2473bab265d..1ef5ce6503b 100644
--- a/lldb/unittests/CMakeLists.txt
+++ b/lldb/unittests/CMakeLists.txt
@@ -21,9 +21,17 @@ if (LLDB_BUILT_STANDALONE)
endif()
function(add_lldb_unittest test_name)
+ cmake_parse_arguments(ARG
+ ""
+ ""
+ "LINK_LIBS;LINK_COMPONENTS"
+ ${ARGN})
+
+ list(APPEND LLVM_LINK_COMPONENTS ${ARG_LINK_COMPONENTS})
+
add_unittest(LLDBUnitTests
${test_name}
- ${ARGN}
+ ${ARG_UNPARSED_ARGUMENTS}
)
add_custom_command(
@@ -33,7 +41,6 @@ function(add_lldb_unittest test_name)
lldb_link_common_libs(${test_name} EXE)
target_link_libraries(${test_name} ${CLANG_USED_LIBS} ${LLDB_SYSTEM_LIBS})
- llvm_config(${test_name} ${LLVM_LINK_COMPONENTS})
endfunction()
function(add_unittest_inputs test_name inputs)
diff --git a/lldb/unittests/Core/CMakeLists.txt b/lldb/unittests/Core/CMakeLists.txt
index 7ac9e777f6b..2c2422943d8 100644
--- a/lldb/unittests/Core/CMakeLists.txt
+++ b/lldb/unittests/Core/CMakeLists.txt
@@ -9,4 +9,10 @@ add_lldb_unittest(LLDBCoreTests
StateTest.cpp
StructuredDataTest.cpp
TimerTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ LINK_COMPONENTS
+ Support
)
diff --git a/lldb/unittests/Editline/CMakeLists.txt b/lldb/unittests/Editline/CMakeLists.txt
index eaa21c490d9..4f656f6cc35 100644
--- a/lldb/unittests/Editline/CMakeLists.txt
+++ b/lldb/unittests/Editline/CMakeLists.txt
@@ -1,3 +1,8 @@
add_lldb_unittest(EditlineTests
EditlineTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbUtility
)
diff --git a/lldb/unittests/Expression/CMakeLists.txt b/lldb/unittests/Expression/CMakeLists.txt
index 04bad141170..c0a701da4f3 100644
--- a/lldb/unittests/Expression/CMakeLists.txt
+++ b/lldb/unittests/Expression/CMakeLists.txt
@@ -1,3 +1,7 @@
add_lldb_unittest(ExpressionTests
GoParserTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbPluginExpressionParserGo
)
diff --git a/lldb/unittests/Host/CMakeLists.txt b/lldb/unittests/Host/CMakeLists.txt
index 4c20f820e3c..4fd929cf339 100644
--- a/lldb/unittests/Host/CMakeLists.txt
+++ b/lldb/unittests/Host/CMakeLists.txt
@@ -4,4 +4,8 @@ add_lldb_unittest(HostTests
SocketAddressTest.cpp
SocketTest.cpp
SymbolsTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
)
diff --git a/lldb/unittests/Interpreter/CMakeLists.txt b/lldb/unittests/Interpreter/CMakeLists.txt
index 4078476bc75..33ab503af9b 100644
--- a/lldb/unittests/Interpreter/CMakeLists.txt
+++ b/lldb/unittests/Interpreter/CMakeLists.txt
@@ -1,5 +1,8 @@
add_lldb_unittest(InterpreterTests
TestArgs.cpp
+
+ LINK_LIBS
+ lldbInterpreter
)
target_link_libraries(InterpreterTests
diff --git a/lldb/unittests/Language/CPlusPlus/CMakeLists.txt b/lldb/unittests/Language/CPlusPlus/CMakeLists.txt
index 6cad97cc6d3..4882eafc8d8 100644
--- a/lldb/unittests/Language/CPlusPlus/CMakeLists.txt
+++ b/lldb/unittests/Language/CPlusPlus/CMakeLists.txt
@@ -1,3 +1,6 @@
add_lldb_unittest(LanguageCPlusPlusTests
CPlusPlusLanguageTest.cpp
+
+ LINK_LIBS
+ lldbPluginCPlusPlusLanguage
)
diff --git a/lldb/unittests/Platform/CMakeLists.txt b/lldb/unittests/Platform/CMakeLists.txt
index af1121dac7b..3362ca08d60 100644
--- a/lldb/unittests/Platform/CMakeLists.txt
+++ b/lldb/unittests/Platform/CMakeLists.txt
@@ -1,3 +1,8 @@
add_lldb_unittest(LLDBPlatformTests
PlatformDarwinTest.cpp
+
+ LINK_LIBS
+ lldbPluginPlatformMacOSX
+ LINK_COMPONENTS
+ Support
)
diff --git a/lldb/unittests/Process/gdb-remote/CMakeLists.txt b/lldb/unittests/Process/gdb-remote/CMakeLists.txt
index de4cac11b23..694ba182d42 100644
--- a/lldb/unittests/Process/gdb-remote/CMakeLists.txt
+++ b/lldb/unittests/Process/gdb-remote/CMakeLists.txt
@@ -2,4 +2,13 @@ add_lldb_unittest(ProcessGdbRemoteTests
GDBRemoteClientBaseTest.cpp
GDBRemoteCommunicationClientTest.cpp
GDBRemoteTestUtils.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbPluginPlatformMacOSX
+ lldbPluginProcessUtility
+ lldbPluginProcessGDBRemote
+ LINK_COMPONENTS
+ Support
)
diff --git a/lldb/unittests/Process/minidump/CMakeLists.txt b/lldb/unittests/Process/minidump/CMakeLists.txt
index 10cb8c34f35..2b2df6327e9 100644
--- a/lldb/unittests/Process/minidump/CMakeLists.txt
+++ b/lldb/unittests/Process/minidump/CMakeLists.txt
@@ -1,5 +1,14 @@
add_lldb_unittest(LLDBMinidumpTests
MinidumpParserTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbTarget
+ lldbPluginProcessUtility
+ lldbPluginProcessMinidump
+ LINK_COMPONENTS
+ Support
)
set(test_inputs
diff --git a/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt b/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
index f011200e647..891ade25b76 100644
--- a/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
@@ -2,7 +2,12 @@ add_lldb_unittest(ScriptInterpreterPythonTests
PythonDataObjectsTests.cpp
PythonExceptionStateTests.cpp
PythonTestSuite.cpp
- )
- target_link_libraries(ScriptInterpreterPythonTests lldbPluginScriptInterpreterPython ${PYTHON_LIBRARY})
+ LINK_LIBS
+ lldbHost
+ lldbPluginScriptInterpreterPython
+ ${PYTHON_LIBRARY}
+ LINK_COMPONENTS
+ Support
+ )
\ No newline at end of file
diff --git a/lldb/unittests/Symbol/CMakeLists.txt b/lldb/unittests/Symbol/CMakeLists.txt
index 75cabddba5c..dca5f17b15d 100644
--- a/lldb/unittests/Symbol/CMakeLists.txt
+++ b/lldb/unittests/Symbol/CMakeLists.txt
@@ -1,4 +1,8 @@
add_lldb_unittest(SymbolTests
TestClangASTContext.cpp
TestType.cpp
+
+ LINK_LIBS
+ lldbHost
+ lldbSymbol
)
diff --git a/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt b/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
index c0e4300dadd..c764bd477fa 100644
--- a/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
+++ b/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
@@ -1,5 +1,16 @@
add_lldb_unittest(SymbolFileDWARFTests
SymbolFileDWARFTests.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbSymbol
+ lldbPluginObjectFilePECOFF
+ lldbPluginSymbolFileDWARF
+ lldbPluginSymbolFilePDB
+ LINK_COMPONENTS
+ Support
+ DebugInfoPDB
)
set(test_inputs
diff --git a/lldb/unittests/SymbolFile/PDB/CMakeLists.txt b/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
index 37adf39463d..d9aff4e2eac 100644
--- a/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
+++ b/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
@@ -1,5 +1,16 @@
add_lldb_unittest(SymbolFilePDBTests
SymbolFilePDBTests.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbSymbol
+ lldbPluginObjectFilePECOFF
+ lldbPluginSymbolFileDWARF
+ lldbPluginSymbolFilePDB
+ LINK_COMPONENTS
+ Support
+ DebugInfoPDB
)
set(test_inputs
diff --git a/lldb/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt b/lldb/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt
index 5e274a22991..7cc0befa386 100644
--- a/lldb/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt
+++ b/lldb/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt
@@ -1,3 +1,15 @@
if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD)
- add_lldb_unittest(InstEmulationTests TestArm64InstEmulation.cpp)
+ add_lldb_unittest(InstEmulationTests
+ TestArm64InstEmulation.cpp
+ LINK_LIBS
+ lldbCore
+ lldbSymbol
+ lldbTarget
+ lldbPluginUnwindAssemblyInstEmulation
+ lldbPluginDisassemblerLLVM
+ lldbPluginInstructionARM64
+ lldbPluginProcessUtility
+ LINK_COMPONENTS
+ Support
+ ${LLVM_TARGETS_TO_BUILD})
endif()
diff --git a/lldb/unittests/UnwindAssembly/x86/CMakeLists.txt b/lldb/unittests/UnwindAssembly/x86/CMakeLists.txt
index 7112467b397..2b5b31f7906 100644
--- a/lldb/unittests/UnwindAssembly/x86/CMakeLists.txt
+++ b/lldb/unittests/UnwindAssembly/x86/CMakeLists.txt
@@ -1,3 +1,10 @@
add_lldb_unittest(UnwindAssemblyx86Tests
Testx86AssemblyInspectionEngine.cpp
+ LINK_LIBS
+ lldbCore
+ lldbSymbol
+ lldbPluginUnwindAssemblyX86
+ LINK_COMPONENTS
+ Support
+ ${LLVM_TARGETS_TO_BUILD}
)
diff --git a/lldb/unittests/Utility/CMakeLists.txt b/lldb/unittests/Utility/CMakeLists.txt
index 15a29825f1d..0594434fb69 100644
--- a/lldb/unittests/Utility/CMakeLists.txt
+++ b/lldb/unittests/Utility/CMakeLists.txt
@@ -4,6 +4,15 @@ add_lldb_unittest(UtilityTests
TaskPoolTest.cpp
TimeoutTest.cpp
UriParserTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbSymbol
+ lldbUtility
+ lldbPluginObjectFileELF
+ LINK_COMPONENTS
+ Support
)
add_unittest_inputs(UtilityTests TestModule.so)
OpenPOWER on IntegriCloud