Files
clang-p2996/lldb/source/API/CMakeLists.txt
Zachary Turner 2c1f46dcc6 Convert the ScriptInterpreter system to a plugin-based one.
Previously embedded interpreters were handled as ad-hoc source
files compiled into source/Interpreter.  This made it hard to
disable a specific interpreter, or to add support for other
interpreters and allow the developer to choose which interpreter(s)
were enabled for a particular build.

This patch converts script interpreters over to a plugin-based system.
Script interpreters now live in source/Plugins/ScriptInterpreter, and
the canonical LLDB interpreter, ScriptInterpreterPython, is moved there
as well.

Any new code interfacing with the Python C API must live in this location
from here on out.  Additionally, generic code should never need to
reference or make assumptions about the presence of a specific interpreter
going forward.

Differential Revision: http://reviews.llvm.org/D11431
Reviewed By: Greg Clayton

llvm-svn: 243681
2015-07-30 20:28:07 +00:00

105 lines
2.3 KiB
CMake

set(LLVM_NO_RTTI 1)
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
add_definitions( -DEXPORT_LIBLLDB )
endif()
# Include this so that add_lldb_library() has the list of dependencies
# for liblldb to link against
include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
add_lldb_library(liblldb SHARED
SBAddress.cpp
SBAttachInfo.cpp
SBBlock.cpp
SBBreakpoint.cpp
SBBreakpointLocation.cpp
SBBroadcaster.cpp
SBCommandInterpreter.cpp
SBCommandReturnObject.cpp
SBCommunication.cpp
SBCompileUnit.cpp
SBData.cpp
SBDebugger.cpp
SBDeclaration.cpp
SBError.cpp
SBEvent.cpp
SBExecutionContext.cpp
SBExpressionOptions.cpp
SBFileSpec.cpp
SBFileSpecList.cpp
SBFrame.cpp
SBFunction.cpp
SBHostOS.cpp
SBInstruction.cpp
SBInstructionList.cpp
SBLanguageRuntime.cpp
SBLaunchInfo.cpp
SBLineEntry.cpp
SBListener.cpp
SBModule.cpp
SBModuleSpec.cpp
SBPlatform.cpp
SBProcess.cpp
SBQueue.cpp
SBQueueItem.cpp
SBSection.cpp
SBSourceManager.cpp
SBStream.cpp
SBStringList.cpp
SBSymbol.cpp
SBSymbolContext.cpp
SBSymbolContextList.cpp
SBTarget.cpp
SBThread.cpp
SBThreadCollection.cpp
SBThreadPlan.cpp
SBType.cpp
SBTypeCategory.cpp
SBTypeEnumMember.cpp
SBTypeFilter.cpp
SBTypeFormat.cpp
SBTypeNameSpecifier.cpp
SBTypeSummary.cpp
SBTypeSynthetic.cpp
SBValue.cpp
SBValueList.cpp
SBVariablesOptions.cpp
SBWatchpoint.cpp
SBUnixSignals.cpp
SystemInitializerFull.cpp
${LLDB_WRAP_PYTHON}
${LLDB_VERS_GENERATED_FILE}
)
# This should not be part of LLDBDependencies.cmake, because we don't
# want every single library taking a dependency on the script interpreters.
target_link_libraries(liblldb PRIVATE
lldbPluginScriptInterpreterNone
lldbPluginScriptInterpreterPython
)
set_target_properties(liblldb
PROPERTIES
VERSION ${LLDB_VERSION}
)
if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
# Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
# so only it needs to explicitly link against ${PYTHON_LIBRARY}
if (MSVC AND NOT LLDB_DISABLE_PYTHON)
target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY})
endif()
else()
set_target_properties(liblldb
PROPERTIES
OUTPUT_NAME lldb
)
endif()
if (LLDB_WRAP_PYTHON OR LLDB_VERS_GENERATED_FILE)
add_dependencies(liblldb swig_wrapper)
endif()
target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS})