[Lldb-commits] [lldb] r229096 - Disable a warning for the python modules as the python C API headers

Chandler Carruth chandlerc at gmail.com
Fri Feb 13 02:22:00 PST 2015


Author: chandlerc
Date: Fri Feb 13 04:22:00 2015
New Revision: 229096

URL: http://llvm.org/viewvc/llvm-project?rev=229096&view=rev
Log:
Disable a warning for the python modules as the python C API headers
trigger this warning. With this, 'ninja' succeeds without warnings for
me on Linux.

Modified:
    lldb/trunk/scripts/Python/modules/CMakeLists.txt

Modified: lldb/trunk/scripts/Python/modules/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modules/CMakeLists.txt?rev=229096&r1=229095&r2=229096&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/modules/CMakeLists.txt (original)
+++ lldb/trunk/scripts/Python/modules/CMakeLists.txt Fri Feb 13 04:22:00 2015
@@ -1,3 +1,10 @@
+# Disable some warnings triggered by Python's headers.
+check_cxx_compiler_flag("-Wno-macro-redefined"
+                        CXX_SUPPORTS_NO_MACRO_REDEFINED)
+if (CXX_SUPPORTS_NO_MACRO_REDEFINED)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-macro-redefined")
+endif ()
+
 # build the Python readline suppression module only on Linux
 if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT __ANDROID_NDK__)
    add_subdirectory(readline)





More information about the lldb-commits mailing list