From: Petr Hosek Date: Wed, 26 Jul 2017 23:49:18 +0000 (+0000) Subject: [CMake] Disable -Werror for CMake checks X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82d2d7a37948d63c6de2ace1053020c9732a7294;p=llvm [CMake] Disable -Werror for CMake checks -Werror may cause some of the CMake checks to fail, so we disable it even if it's enabled for the build itself. Differential Revision: https://reviews.llvm.org/D35924 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309235 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 0676317acc6..5efdb0f8a27 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -381,6 +381,7 @@ if( MSVC ) elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE ) append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + append_if(LLVM_ENABLE_WERROR "-Wno-error" CMAKE_REQUIRED_FLAGS) add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME) if (LLVM_ENABLE_CXX1Y) check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y)