[llvm] r341717 - [benchmark] Fix flags used to compile benchmark library with clang-cl

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 7 14:47:25 PDT 2018


Author: rnk
Date: Fri Sep  7 14:47:25 2018
New Revision: 341717

URL: http://llvm.org/viewvc/llvm-project?rev=341717&view=rev
Log:
[benchmark] Fix flags used to compile benchmark library with clang-cl

`MSVC` is true for clang-cl, but `"${CMAKE_CXX_COMPILER_ID}" STREQUAL
"MSVC"` is false, so we would enable -Wall, which means -Weverything
with clang-cl, and we get tons of undesired warnings.

Use the simpler condition to fix things.

Modified:
    llvm/trunk/utils/benchmark/CMakeLists.txt

Modified: llvm/trunk/utils/benchmark/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/benchmark/CMakeLists.txt?rev=341717&r1=341716&r2=341717&view=diff
==============================================================================
--- llvm/trunk/utils/benchmark/CMakeLists.txt (original)
+++ llvm/trunk/utils/benchmark/CMakeLists.txt Fri Sep  7 14:47:25 2018
@@ -90,7 +90,7 @@ if (BENCHMARK_BUILD_32_BITS)
   add_required_cxx_compiler_flag(-m32)
 endif()
 
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+if (MSVC)
   # Turn compiler warnings up to 11
   string(REGEX REPLACE "[-/]W[1-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")




More information about the llvm-commits mailing list