[llvm] r234343 - Enable W4 warnings by default for MSVC builds

Zachary Turner zturner at google.com
Mon Apr 13 11:16:39 PDT 2015


Hi Andy, this is causing a huge slew of warning spam.  Is this expected?
CMake passes /W3 by default, so  every single translation unit I compile
gives me the following warning:

cl : Command line warning D9025 : overriding '/W3' with '/W4'

Furthermore, since this is a command line warning and not a compiler
warning, it cannot be suppressed.  Unless you have any better ideas on how
to address this, I think this should be reverted.


On Tue, Apr 7, 2015 at 12:07 PM Andrew Kaylor <andrew.kaylor at intel.com>
wrote:

> Author: akaylor
> Date: Tue Apr  7 14:01:01 2015
> New Revision: 234343
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234343&view=rev
> Log:
> Enable W4 warnings by default for MSVC builds
>
> Modified:
>     llvm/trunk/CMakeLists.txt
>
> Modified: llvm/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=234343&r1=234342&r2=234343&view=diff
>
> ==============================================================================
> --- llvm/trunk/CMakeLists.txt (original)
> +++ llvm/trunk/CMakeLists.txt Tue Apr  7 14:01:01 2015
> @@ -233,14 +233,7 @@ list(REMOVE_DUPLICATES LLVM_TARGETS_TO_B
>  include(AddLLVMDefinitions)
>
>  option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)
> -
> -# MSVC has a gazillion warnings with this.
> -if( MSVC )
> -  option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." OFF)
> -else()
> -  option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
> -endif()
> -
> +option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
>  option(LLVM_ENABLE_MODULES "Compile with C++ modules enabled." OFF)
>  option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF)
>  option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150413/5c779b48/attachment.html>


More information about the llvm-commits mailing list