[Lldb-commits] [PATCH] D47742: Change SWIG output directory when building LLDB.framework with CMake
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 4 13:27:45 PDT 2018
xiaobai created this revision.
xiaobai added a reviewer: clayborg.
Herald added a subscriber: mgorny.
Instead of assuming that SWIG generated files (e.g. lldb.py) will live
in scripts, we should set it to $LLDB_PYTHON_TARGET_DIR. This variable is set to
scripts, except when building LLDB.framework when it is set to
LLDB_FRAMEWORK_DIR.
https://reviews.llvm.org/D47742
Files:
CMakeLists.txt
scripts/CMakeLists.txt
Index: scripts/CMakeLists.txt
===================================================================
--- scripts/CMakeLists.txt
+++ scripts/CMakeLists.txt
@@ -35,7 +35,7 @@
find_package(SWIG REQUIRED)
add_custom_command(
OUTPUT ${LLDB_WRAP_PYTHON}
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
+ OUTPUT ${LLDB_PYTHON_TARGET_DIR}/lldb.py
DEPENDS ${SWIG_SOURCES}
DEPENDS ${SWIG_INTERFACES}
DEPENDS ${SWIG_HEADERS}
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -138,15 +138,15 @@
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
--srcRoot=${LLDB_SOURCE_DIR}
--targetDir=${LLDB_PYTHON_TARGET_DIR}
- --cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}/scripts
+ --cfgBldDir=${LLDB_PYTHON_TARGET_DIR}
--prefix=${CMAKE_BINARY_DIR}
--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}
--lldbLibDir=lib${LLVM_LIBDIR_SUFFIX}
${SIX_EXTRA_ARGS}
${FINISH_EXTRA_ARGS}
VERBATIM
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/scripts/lldb.py
+ DEPENDS ${LLDB_PYTHON_TARGET_DIR}/lldb.py
COMMENT "Python script sym-linking LLDB Python API")
# We depend on liblldb being built before we can do this step.
add_dependencies(finish_swig liblldb lldb-argdumper)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47742.149843.patch
Type: text/x-patch
Size: 1519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180604/b7ce7136/attachment.bin>
More information about the lldb-commits
mailing list