From ff16b9ac90dc92ebb2b3097707148930abeca2f8 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 29 Jul 2015 21:07:28 +0000 Subject: Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM" This change was reverted in r243550 because it broke clang-format builds (see PR24306). This patch recommits a fixed version of the original. llvm-svn: 243574 --- libcxx/cmake/Modules/HandleLibCXXABI.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libcxx/cmake/Modules/HandleLibCXXABI.cmake') diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake index 73723e3559b..4224882f422 100644 --- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake +++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake @@ -58,6 +58,21 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs) endmacro() +# Setup the default options if LIBCXX_CXX_ABI is not specified. +if (NOT LIBCXX_CXX_ABI) + if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND + IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi") + set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi") + set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include") + set(LIBCXX_CXX_ABI_INTREE 1) + else () + set(LIBCXX_CXX_ABI_LIBNAME "none") + endif () +else () + set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}") +endif () + +# Configure based on the selected ABI library. if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libsupc++") set(_LIBSUPCXX_INCLUDE_FILES -- cgit v1.2.3