diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
commit | 721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (patch) | |
tree | eacfc83d988e4b9d11114387ae7dc41243f2a363 /cmake/modules/HandleLLVMOptions.cmake | |
parent | 2b2816e083a455f7a656ae88b0fd059d1688bb36 (diff) | |
download | FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.zip FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.tar.gz |
Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
Diffstat (limited to 'cmake/modules/HandleLLVMOptions.cmake')
-rw-r--r-- | cmake/modules/HandleLLVMOptions.cmake | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index d10e59a..b5f96e8 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -105,8 +105,9 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) if( LLVM_BUILD_32_BITS ) message(STATUS "Building 32 bits executables and libraries.") add_llvm_definitions( -m32 ) - list(APPEND CMAKE_EXE_LINKER_FLAGS -m32) - list(APPEND CMAKE_SHARED_LINKER_FLAGS -m32) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -m32") endif( LLVM_BUILD_32_BITS ) endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) @@ -150,8 +151,11 @@ if( MSVC ) -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS + # Disabled warnings. + -wd4065 # Suppress 'switch statement contains 'default' but no 'case' labels' -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned' -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored' + -wd4181 # Suppress 'qualifier applied to reference type; ignored' -wd4224 # Suppress 'nonstandard extension used : formal parameter 'identifier' was previously defined as a type' -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data' -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data' @@ -165,14 +169,18 @@ if( MSVC ) -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible' -wd4715 # Suppress ''function' : not all control paths return a value' -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)' - -wd4065 # Suppress 'switch statement contains 'default' but no 'case' labels' - -wd4181 # Suppress 'qualifier applied to reference type; ignored' - -w14062 # Promote "enumerator in switch of enum is not handled" to level 1 warning. + + # Promoted warnings. + -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning. + + # Promoted warnings to errors. + -we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error. + -we4239 # Promote 'nonstandard extension used : 'token' : conversion from 'type' to 'type'' to error. ) # Enable warnings if (LLVM_ENABLE_WARNINGS) - add_llvm_definitions( /W4 /Wall ) + add_llvm_definitions( /W4 ) if (LLVM_ENABLE_PEDANTIC) # No MSVC equivalent available endif (LLVM_ENABLE_PEDANTIC) |