[libcxx] r343433 - Turn off warnings under clang-cl
Eric Fiselier
eric at efcs.ca
Sun Sep 30 18:15:50 PDT 2018
Author: ericwf
Date: Sun Sep 30 18:15:50 2018
New Revision: 343433
URL: http://llvm.org/viewvc/llvm-project?rev=343433&view=rev
Log:
Turn off warnings under clang-cl
Modified:
libcxx/trunk/CMakeLists.txt
Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=343433&r1=343432&r2=343433&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Sun Sep 30 18:15:50 2018
@@ -124,6 +124,11 @@ if (NOT LIBCXX_ENABLE_SHARED AND NOT LIB
message(FATAL_ERROR "libc++ must be built as either a shared or static library.")
endif()
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
+ message(STATUS "Configuring for clang-cl")
+ set(LIBCXX_TARGETING_CLANG_CL ON)
+endif()
+
# ABI Library options ---------------------------------------------------------
set(LIBCXX_CXX_ABI "default" CACHE STRING
"Specify C++ ABI library to use.")
@@ -548,6 +553,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "
add_compile_flags_if_supported(
-Wno-user-defined-literals
-Wno-covered-switch-default)
+ if (LIBCXX_TARGETING_CLANG_CL)
+ add_compile_flags_if_supported(
+ -Wno-c++98-compat
+ -Wno-c++11-compat
+ -Wno-undef
+ )
+ endif()
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
add_compile_flags_if_supported(
-Wno-literal-suffix
More information about the libcxx-commits
mailing list