Author: jdevlieghere Date: Mon Mar 25 16:36:12 2019 New Revision: 356967 URL: http://llvm.org/viewvc/llvm-project?rev=356967&view=rev Log: [Python] Move SWIG wrapper dependency into the plugin
This should fix the Windows bot (fingers crossed). Modified: lldb/trunk/source/API/CMakeLists.txt lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt Modified: lldb/trunk/source/API/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=356967&r1=356966&r2=356967&view=diff ============================================================================== --- lldb/trunk/source/API/CMakeLists.txt (original) +++ lldb/trunk/source/API/CMakeLists.txt Mon Mar 25 16:36:12 2019 @@ -4,11 +4,6 @@ endif() get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS) -if(NOT LLDB_DISABLE_PYTHON) - get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR) - set(lldb_python_wrapper ${lldb_scripts_dir}/LLDBWrapPython.cpp) -endif() - add_lldb_library(liblldb SHARED SBAddress.cpp SBAttachInfo.cpp Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt?rev=356967&r1=356966&r2=356967&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt Mon Mar 25 16:36:12 2019 @@ -11,10 +11,16 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windo endif() endif() +if(NOT LLDB_DISABLE_PYTHON) + get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR) + set(lldb_python_wrapper ${lldb_scripts_dir}/LLDBWrapPython.cpp) +endif() + add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN PythonDataObjects.cpp PythonExceptionState.cpp ScriptInterpreterPython.cpp + ${lldb_python_wrapper} LINK_LIBS lldbBreakpoint @@ -26,3 +32,24 @@ add_lldb_library(lldbPluginScriptInterpr LINK_COMPONENTS Support ) + +if(lldb_python_wrapper) + add_dependencies(lldbPluginScriptInterpreterPython swig_wrapper) + + if (MSVC) + set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0") + else() + set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " -w") + endif() + + set_source_files_properties(${lldb_python_wrapper} PROPERTIES GENERATED ON) + if (CLANG_CL) + set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING + PROPERTY COMPILE_FLAGS " -Wno-unused-function") + endif() + if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND + NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") + set_property(SOURCE ${lldb_python_wrapper} APPEND_STRING + PROPERTY COMPILE_FLAGS " -Wno-sequence-point -Wno-cast-qual") + endif () +endif() Modified: lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt?rev=356967&r1=356966&r2=356967&view=diff ============================================================================== --- lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt (original) +++ lldb/trunk/unittests/ScriptInterpreter/Python/CMakeLists.txt Mon Mar 25 16:36:12 2019 @@ -7,7 +7,7 @@ add_lldb_unittest(ScriptInterpreterPytho lldbHost lldbPluginScriptInterpreterPython ${PYTHON_LIBRARY} + ${lldb_python_wrapper} LINK_COMPONENTS Support ) - \ No newline at end of file _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits