[PATCH] D13690: Silence MSVC warning D9025 when /W3 present after /W4
angelsl via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 04:16:47 PDT 2015
angelsl created this revision.
angelsl added a reviewer: compnerd.
angelsl added subscribers: compnerd, llvm-commits.
http://reviews.llvm.org/D13690
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -201,6 +201,10 @@
include(config-ix)
if(MSVC)
+ # MSVC will give a warning if there is already another warning option.
+ # Remove any such option if present before appending /W3.
+ string(REGEX REPLACE " /W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ string(REGEX REPLACE " /W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
append_string_if(COMPILER_RT_HAS_W3_FLAG /W3 CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
else()
append_string_if(COMPILER_RT_HAS_WALL_FLAG -Wall CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13690.37229.patch
Type: text/x-patch
Size: 634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151013/b0fc6c2e/attachment.bin>
More information about the llvm-commits
mailing list