summaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-10-01 01:15:50 +0000
committerEric Fiselier <eric@efcs.ca>2018-10-01 01:15:50 +0000
commit5150019b457bf5ebde2f0043f8439c6d34538d32 (patch)
treeca50defc5aeb5a385819e027a137ebf1893bd631 /libcxx
parentda3d1ebae3cc15106b96f028b790b14c9e33ce45 (diff)
Turn off warnings under clang-cl
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index fb866e1ebc9..55bcd3a31ed 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -124,6 +124,11 @@ if (NOT LIBCXX_ENABLE_SHARED AND NOT LIBCXX_ENABLE_STATIC)
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 "Clang")
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