[libcxxabi] r213214 - libcxxabi cmake: Use HandleLLVMOptions.cmake, don't manually add -std=c++11.
Nico Weber
nicolasweber at gmx.de
Wed Jul 16 16:53:37 PDT 2014
Author: nico
Date: Wed Jul 16 18:53:37 2014
New Revision: 213214
URL: http://llvm.org/viewvc/llvm-project?rev=213214&view=rev
Log:
libcxxabi cmake: Use HandleLLVMOptions.cmake, don't manually add -std=c++11.
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.)
Modified:
libcxxabi/trunk/CMakeLists.txt
libcxxabi/trunk/cmake/config-ix.cmake
Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=213214&r1=213213&r2=213214&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Wed Jul 16 18:53:37 2014
@@ -54,6 +54,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
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()
@@ -154,11 +155,7 @@ endmacro()
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
Modified: libcxxabi/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/cmake/config-ix.cmake?rev=213214&r1=213213&r2=213214&view=diff
==============================================================================
--- libcxxabi/trunk/cmake/config-ix.cmake (original)
+++ libcxxabi/trunk/cmake/config-ix.cmake Wed Jul 16 18:53:37 2014
@@ -2,7 +2,6 @@ include(CheckLibraryExists)
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)
More information about the cfe-commits
mailing list