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.

llvm-svn: 229096
This commit is contained in:
Chandler Carruth 2015-02-13 10:22:00 +00:00
parent 7ecd99163c
commit 80b5f793e1
1 changed files with 7 additions and 0 deletions

View File

@ -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)