From: Zachary Turner Date: Thu, 10 Jul 2014 20:37:47 +0000 (+0000) Subject: Move the post-build step that creates lldb.py. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=026861b87d7bfbdaf31ced93e8c916008b72cce8;p=platform%2Fupstream%2Fllvm.git 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 --- 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