aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorEdwin Vane <edwin.vane@intel.com>2013-02-04 02:32:44 +0000
committerEdwin Vane <edwin.vane@intel.com>2013-02-04 02:32:44 +0000
commit4b5dbaa96a6e51e925ac017468538754aad8e5cc (patch)
treee72b9dbd9c07cae7c44f53e06b714ace0313d5a4 /cmake/modules
parent87b1a453f08fd0d56a074d2d665f779232a6cac0 (diff)
downloadexternal_llvm-4b5dbaa96a6e51e925ac017468538754aad8e5cc.zip
external_llvm-4b5dbaa96a6e51e925ac017468538754aad8e5cc.tar.gz
external_llvm-4b5dbaa96a6e51e925ac017468538754aad8e5cc.tar.bz2
Turn off uninitialized-use warnings for gcc in cmake build
Added support to the cmake build to turn off uninitialized use warnings for gcc. This cleans the build up somewhat. Used logic simpler than found in autoconf by making use of the fact that although gcc won't complain about unsupported -Wno-* flags it *will* complain about unsupported -W flags. Reviewers: gribozavr, doug.gregor, chandlerc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/HandleLLVMOptions.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
index 3cf1ef2..9121080 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/cmake/modules/HandleLLVMOptions.cmake
@@ -206,6 +206,12 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
if( C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcovered-switch-default" )
endif()
+ if (USE_NO_UNINITIALIZED)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized")
+ endif()
+ if (USE_NO_MAYBE_UNINITIALIZED)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
+ endif()
endif (LLVM_ENABLE_WARNINGS)
if (LLVM_ENABLE_WERROR)
add_llvm_definitions( -Werror )