Remove even more warnings from clang-cl build
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -50,6 +50,10 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
|
|||||||
"${PROJECT_NAME} requires an out of source build. Please create a separate
|
"${PROJECT_NAME} requires an out of source build. Please create a separate
|
||||||
build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there."
|
build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there."
|
||||||
)
|
)
|
||||||
|
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()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set(LIBCXX_TARGETING_MSVC ON)
|
set(LIBCXX_TARGETING_MSVC ON)
|
||||||
@@ -124,11 +128,6 @@ if (NOT LIBCXX_ENABLE_SHARED AND NOT LIBCXX_ENABLE_STATIC)
|
|||||||
message(FATAL_ERROR "libc++ must be built as either a shared or static library.")
|
message(FATAL_ERROR "libc++ must be built as either a shared or static library.")
|
||||||
endif()
|
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 ---------------------------------------------------------
|
# ABI Library options ---------------------------------------------------------
|
||||||
set(LIBCXX_CXX_ABI "default" CACHE STRING
|
set(LIBCXX_CXX_ABI "default" CACHE STRING
|
||||||
"Specify C++ ABI library to use.")
|
"Specify C++ ABI library to use.")
|
||||||
@@ -556,8 +555,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
|||||||
if (LIBCXX_TARGETING_CLANG_CL)
|
if (LIBCXX_TARGETING_CLANG_CL)
|
||||||
add_compile_flags_if_supported(
|
add_compile_flags_if_supported(
|
||||||
-Wno-c++98-compat
|
-Wno-c++98-compat
|
||||||
|
-Wno-c++98-compat-pedantic
|
||||||
-Wno-c++11-compat
|
-Wno-c++11-compat
|
||||||
-Wno-undef
|
-Wno-undef
|
||||||
|
-Wno-reserved-id-macro
|
||||||
|
-Wno-gnu-include-next
|
||||||
|
-Wno-gcc-compat # For ignoring "'diagnose_if' is a clang extension" warnings
|
||||||
|
-Wno-zero-as-null-pointer-constant # FIXME: Remove this and fix all occurances.
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
||||||
|
|||||||
Reference in New Issue
Block a user