When -Werror is used, we don't have control over the generated
code from SWIG, and it often has warnings. Just disable them for
this file when -Werror is used, they are usually not important
anyway.
Differential revision: https://reviews.llvm.org/D25246
llvm-svn: 283343
${LLDB_WRAP_PYTHON}
)
+if (LLVM_ENABLE_WERROR)
+ if (MSVC)
+ set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
+ else()
+ set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
+ endif()
+endif()
+
# This should not be part of LLDBDependencies.cmake, because we don't
# want every single library taking a dependency on the script interpreters.
target_link_libraries(liblldb PRIVATE