From 89a5f54f1d60f22a1f895f3ccefced32cc7bcb1b Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Thu, 13 Nov 2014 19:45:27 +0000 Subject: [PATCH] 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 --- cmake/modules/HandleLLVMOptions.cmake | 1 + 1 file changed, 1 insertion(+) 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 -- 2.40.0