Use -Wcast-qual in cmake builds, not only autoconfo ones.
authorRoman Divacky <rdivacky@freebsd.org>
Thu, 13 Nov 2014 19:45:27 +0000 (19:45 +0000)
committerRoman Divacky <rdivacky@freebsd.org>
Thu, 13 Nov 2014 19:45:27 +0000 (19:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221913 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/HandleLLVMOptions.cmake

index 0fceb3d48cba7b9edc86fb567d06352662586beb..b178ad1d027b0b459889dca35603dbe1febed41e 100644 (file)
@@ -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