[PATCH]: enable -Wcast-qual in cmake builds
Roman Divacky
rdivacky at vlakno.cz
Tue Nov 11 13:48:50 PST 2014
Hi,
The inline patch enables -Wcast-qual in cmake builds. The warning
is already enabled for autoconf builds. Note that clang doesnt
yet support that warning. I posted a patch to implement that
warning. LLVM+clang+lld build is -Wcast-qual safe.
Ok to commit?
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake (revision 221712)
+++ cmake/modules/HandleLLVMOptions.cmake (working copy)
@@ -276,6 +276,7 @@
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
Roman
More information about the llvm-commits
mailing list