From: Roman Divacky Date: Thu, 13 Nov 2014 19:45:27 +0000 (+0000) Subject: Use -Wcast-qual in cmake builds, not only autoconfo ones. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=89a5f54f1d60f22a1f895f3ccefced32cc7bcb1b;p=oota-llvm.git Use -Wcast-qual in cmake builds, not only autoconfo ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221913 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 0fceb3d48cb..b178ad1d027 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -276,6 +276,7 @@ if( MSVC ) elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE ) if (LLVM_ENABLE_WARNINGS) append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + append("-Wcast-qual" CMAKE_CXX_FLAGS) # Turn off missing field initializer warnings for gcc to avoid noise from # false positives with empty {}. Turn them on otherwise (they're off by