[Lldb-commits] [lldb] r333968 - Change SWIG output directory when building LLDB.framework with CMake

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 4 16:47:37 PDT 2018


Author: xiaobai
Date: Mon Jun  4 16:47:36 2018
New Revision: 333968

URL: http://llvm.org/viewvc/llvm-project?rev=333968&view=rev
Log:
Change SWIG output directory when building LLDB.framework with CMake

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.

Differential Revision: https://reviews.llvm.org/D47742

Modified:
    lldb/trunk/CMakeLists.txt
    lldb/trunk/scripts/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=333968&r1=333967&r2=333968&view=diff
==============================================================================
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Mon Jun  4 16:47:36 2018
@@ -138,7 +138,7 @@ if (NOT LLDB_DISABLE_PYTHON)
            ${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}
@@ -146,7 +146,7 @@ if (NOT LLDB_DISABLE_PYTHON)
                ${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)

Modified: lldb/trunk/scripts/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/CMakeLists.txt?rev=333968&r1=333967&r2=333968&view=diff
==============================================================================
--- lldb/trunk/scripts/CMakeLists.txt (original)
+++ lldb/trunk/scripts/CMakeLists.txt Mon Jun  4 16:47:36 2018
@@ -35,7 +35,7 @@ get_filename_component(CFGBLDDIR ${LLDB_
 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}




More information about the lldb-commits mailing list