diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-03-25 23:36:12 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-03-25 23:36:12 +0000 |
commit | 1d1f1ba3d240aa0109ed71e6c0aef1e5cf0e6a89 (patch) | |
tree | 26076b10555a720b023dd6f86680fd7fe1cdd181 /lldb/source/Plugins/ScriptInterpreter/Python | |
parent | e6c24299d2373b2c809e4577bae8c308a971485c (diff) | |
download | bcm5719-llvm-1d1f1ba3d240aa0109ed71e6c0aef1e5cf0e6a89.tar.gz bcm5719-llvm-1d1f1ba3d240aa0109ed71e6c0aef1e5cf0e6a89.zip |
[Python] Move SWIG wrapper dependency into the plugin
This should fix the Windows bot (fingers crossed).
llvm-svn: 356967
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt index 56eacc941d6..86ff4f689bd 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt +++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt @@ -11,10 +11,16 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") 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(lldbPluginScriptInterpreterPython PLUGIN 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() |