[Lldb-commits] [lldb] r293821 - [CMake] Update unit tests with accurate dependencies
Chris Bieneman via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 1 14:17:00 PST 2017
Author: cbieneman
Date: Wed Feb 1 16:17:00 2017
New Revision: 293821
URL: http://llvm.org/viewvc/llvm-project?rev=293821&view=rev
Log:
[CMake] Update unit tests with accurate dependencies
This is extending the updates from r293696 to the LLDB unit tests.
Modified:
lldb/trunk/unittests/Breakpoint/CMakeLists.txt
lldb/trunk/unittests/CMakeLists.txt
lldb/trunk/unittests/Core/CMakeLists.txt
lldb/trunk/unittests/Editline/CMakeLists.txt
lldb/trunk/unittests/Expression/CMakeLists.txt
lldb/trunk/unittests/Host/CMakeLists.txt
lldb/trunk/unittests/Interpreter/CMakeLists.txt
lldb/trunk/unittests/Language/CPlusPlus/CMakeLists.txt
lldb/trunk/unittests/Platform/CMakeLists.txt
lldb/trunk/unittests/Process/gdb-remote/CMakeLists.txt
lldb/trunk/unittests/Process/minidump/CMakeLists.txt
lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt
lldb/trunk/unittests/Symbol/CMakeLists.txt
lldb/trunk/unittests/SymbolFile/DWARF/CMakeLists.txt
lldb/trunk/unittests/SymbolFile/PDB/CMakeLists.txt
lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt
lldb/trunk/unittests/UnwindAssembly/x86/CMakeLists.txt
lldb/trunk/unittests/Utility/CMakeLists.txt
Modified: lldb/trunk/unittests/Breakpoint/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Breakpoint/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Breakpoint/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Breakpoint/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,3 +1,9 @@
add_lldb_unittest(LLDBBreakpointTests
BreakpointIDTest.cpp
+
+ LINK_LIBS
+ lldbBreakpoint
+ lldbCore
+ LINK_COMPONENTS
+ Support
)
Modified: lldb/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/CMakeLists.txt (original)
+++ lldb/trunk/unittests/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -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)
Modified: lldb/trunk/unittests/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Core/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -9,4 +9,10 @@ add_lldb_unittest(LLDBCoreTests
StateTest.cpp
StructuredDataTest.cpp
TimerTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ LINK_COMPONENTS
+ Support
)
Modified: lldb/trunk/unittests/Editline/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Editline/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Editline/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Editline/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,3 +1,8 @@
add_lldb_unittest(EditlineTests
EditlineTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbUtility
)
Modified: lldb/trunk/unittests/Expression/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Expression/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Expression/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Expression/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,3 +1,7 @@
add_lldb_unittest(ExpressionTests
GoParserTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbPluginExpressionParserGo
)
Modified: lldb/trunk/unittests/Host/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Host/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Host/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -4,4 +4,8 @@ add_lldb_unittest(HostTests
SocketAddressTest.cpp
SocketTest.cpp
SymbolsTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
)
Modified: lldb/trunk/unittests/Interpreter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Interpreter/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Interpreter/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Interpreter/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,5 +1,8 @@
add_lldb_unittest(InterpreterTests
TestArgs.cpp
+
+ LINK_LIBS
+ lldbInterpreter
)
target_link_libraries(InterpreterTests
Modified: lldb/trunk/unittests/Language/CPlusPlus/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Language/CPlusPlus/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Language/CPlusPlus/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Language/CPlusPlus/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,3 +1,6 @@
add_lldb_unittest(LanguageCPlusPlusTests
CPlusPlusLanguageTest.cpp
+
+ LINK_LIBS
+ lldbPluginCPlusPlusLanguage
)
Modified: lldb/trunk/unittests/Platform/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Platform/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Platform/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Platform/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,3 +1,8 @@
add_lldb_unittest(LLDBPlatformTests
PlatformDarwinTest.cpp
+
+ LINK_LIBS
+ lldbPluginPlatformMacOSX
+ LINK_COMPONENTS
+ Support
)
Modified: lldb/trunk/unittests/Process/gdb-remote/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/gdb-remote/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Process/gdb-remote/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -2,4 +2,13 @@ add_lldb_unittest(ProcessGdbRemoteTests
GDBRemoteClientBaseTest.cpp
GDBRemoteCommunicationClientTest.cpp
GDBRemoteTestUtils.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbPluginPlatformMacOSX
+ lldbPluginProcessUtility
+ lldbPluginProcessGDBRemote
+ LINK_COMPONENTS
+ Support
)
Modified: lldb/trunk/unittests/Process/minidump/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/minidump/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/minidump/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Process/minidump/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,5 +1,14 @@
add_lldb_unittest(LLDBMinidumpTests
MinidumpParserTest.cpp
+
+ LINK_LIBS
+ lldbCore
+ lldbHost
+ lldbTarget
+ lldbPluginProcessUtility
+ lldbPluginProcessMinidump
+ LINK_COMPONENTS
+ Support
)
set(test_inputs
Modified: lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt (original)
+++ lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -2,7 +2,12 @@ add_lldb_unittest(ScriptInterpreterPytho
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
Modified: lldb/trunk/unittests/Symbol/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Symbol/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Symbol/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Symbol/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,4 +1,8 @@
add_lldb_unittest(SymbolTests
TestClangASTContext.cpp
TestType.cpp
+
+ LINK_LIBS
+ lldbHost
+ lldbSymbol
)
Modified: lldb/trunk/unittests/SymbolFile/DWARF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/SymbolFile/DWARF/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/SymbolFile/DWARF/CMakeLists.txt (original)
+++ lldb/trunk/unittests/SymbolFile/DWARF/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -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
Modified: lldb/trunk/unittests/SymbolFile/PDB/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/SymbolFile/PDB/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/SymbolFile/PDB/CMakeLists.txt (original)
+++ lldb/trunk/unittests/SymbolFile/PDB/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -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
Modified: lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt (original)
+++ lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -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()
Modified: lldb/trunk/unittests/UnwindAssembly/x86/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/x86/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/UnwindAssembly/x86/CMakeLists.txt (original)
+++ lldb/trunk/unittests/UnwindAssembly/x86/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -1,3 +1,10 @@
add_lldb_unittest(UnwindAssemblyx86Tests
Testx86AssemblyInspectionEngine.cpp
+ LINK_LIBS
+ lldbCore
+ lldbSymbol
+ lldbPluginUnwindAssemblyX86
+ LINK_COMPONENTS
+ Support
+ ${LLVM_TARGETS_TO_BUILD}
)
Modified: lldb/trunk/unittests/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/CMakeLists.txt?rev=293821&r1=293820&r2=293821&view=diff
==============================================================================
--- lldb/trunk/unittests/Utility/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Utility/CMakeLists.txt Wed Feb 1 16:17:00 2017
@@ -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)
More information about the lldb-commits
mailing list