No intended behavior change on Linux and Mac OS X. On Windows, having libcxxabi
in one's checkout should now no longer break running cmake. (cl.exe supports
c++11, but doesn't understand a -std= flag.)
llvm-svn: 213214
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
include(${LLVMCONFIG_FILE})
include("${LLVM_CMAKE_PATH}/AddLLVM.cmake")
+ include("${LLVM_CMAKE_PATH}/HandleLLVMOptions.cmake")
else()
message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}")
endif()
if (LIBCXXABI_HAS_NOSTDINCXX_FLAG)
list(APPEND LIBCXXABI_CXX_REQUIRED_FLAGS -nostdinc++)
endif()
-if (NOT LIBCXXABI_HAS_STDCXX11_FLAG)
- message(FATAL_ERROR "Building libcxxabi requires a C++11 capable compiler.")
-endif()
-list(APPEND LIBCXXABI_CXX_REQUIRED_FLAGS -std=c++11)
append_if(LIBCXXABI_CXX_REQUIRED_FLAGS LIBCXXABI_HAS_WERROR_FLAG -Werror=return-type)
# Get warning flags
include(CheckCXXCompilerFlag)
# Check compiler flags
-check_cxx_compiler_flag(-std=c++11 LIBCXXABI_HAS_STDCXX11_FLAG)
check_cxx_compiler_flag(-fPIC LIBCXXABI_HAS_FPIC_FLAG)
check_cxx_compiler_flag(-fstrict-aliasing LIBCXXABI_HAS_FSTRICT_ALIASING_FLAG)
check_cxx_compiler_flag(-nodefaultlibs LIBCXXABI_HAS_NODEFAULTLIBS_FLAG)