aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-07-10 20:37:47 +0000
committerZachary Turner <zturner@google.com>2014-07-10 20:37:47 +0000
commit026861b87d7bfbdaf31ced93e8c916008b72cce8 (patch)
tree086b8887ac621f1d538595a923edb78bc77e640d
parent454955e1b3d2958140a64acb895ee904d5974e9e (diff)
downloadllvm-026861b87d7bfbdaf31ced93e8c916008b72cce8.zip
llvm-026861b87d7bfbdaf31ced93e8c916008b72cce8.tar.gz
llvm-026861b87d7bfbdaf31ced93e8c916008b72cce8.tar.bz2
Move the post-build step that creates lldb.py.
Being in lldb\source, ${CMAKE_CURRENT_BINARY_DIR} would resolve to the build\tools\lldb\source directory. For correct operation, and parity with the shell script, it needs to resolve to the build\tools\lldb\scripts directory. llvm-svn: 212760
-rw-r--r--lldb/scripts/CMakeLists.txt8
-rw-r--r--lldb/source/CMakeLists.txt10
2 files changed, 8 insertions, 10 deletions
diff --git a/lldb/scripts/CMakeLists.txt b/lldb/scripts/CMakeLists.txt
index 773a5b7..b11f2fc 100644
--- a/lldb/scripts/CMakeLists.txt
+++ b/lldb/scripts/CMakeLists.txt
@@ -18,6 +18,14 @@ if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION )
# Install the LLDB python module on all operating systems
install(SCRIPT lldb_python_module.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" -DCMAKE_BUILD_DIR=\"${CMAKE_BUILD_DIR}\")
+
+ # Add a Post-Build Event to copy over Python files and create the symlink to liblldb.so for the Python API(hardlink on Windows)
+ add_custom_command( TARGET liblldb
+ POST_BUILD
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/finishSwigWrapperClasses.py
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Python/finishSwigPythonLLDB.py
+ COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/finishSwigWrapperClasses.py -d "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}" "--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}" -m
+ COMMENT "Python script sym-linking LLDB Python API")
else ()
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
diff --git a/lldb/source/CMakeLists.txt b/lldb/source/CMakeLists.txt
index b130641..d319ec4 100644
--- a/lldb/source/CMakeLists.txt
+++ b/lldb/source/CMakeLists.txt
@@ -327,16 +327,6 @@ endif ()
# FIXME: implement svn/git revision and repository parsing solution on Windows. There is an SVN-only
# revision parsing solution in tools/clang/lib/Basic/CMakelists.txt.
-if ( LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION )
- # Add a Post-Build Event to copy over Python files and create the symlink to liblldb.so for the Python API(hardlink on Windows)
- if ( NOT LLDB_DISABLE_PYTHON )
- add_custom_command( TARGET liblldb
- POST_BUILD
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/finishSwigWrapperClasses.py "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}" "--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}" -m
- COMMENT "Python script sym-linking LLDB Python API")
- endif ()
-endif ()
-
install(TARGETS liblldb
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib