Index: libcxx/trunk/CMakeLists.txt =================================================================== --- libcxx/trunk/CMakeLists.txt +++ libcxx/trunk/CMakeLists.txt @@ -45,15 +45,18 @@ option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support headers." ON) set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++) -if (NOT DEFINED LIBCXX_CXX_ABI) - if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi") - set(LIBCXX_CXX_ABI "libcxxabi") +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_LIBCXXABI_INCLUDE_PATHS "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include") set(LIBCXX_CXX_ABI_INTREE 1) else () - set(LIBCXX_CXX_ABI "none") + set(LIBCXX_CXX_ABI_LIBNAME "none") endif () -endif() +else () + set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}") +endif () set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING "Specify C++ ABI library to use." FORCE) set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS}) @@ -134,13 +137,13 @@ ) endmacro() -if ("${LIBCXX_CXX_ABI}" STREQUAL "libstdc++" OR - "${LIBCXX_CXX_ABI}" STREQUAL "libsupc++") +if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR + "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libsupc++") set(_LIBSUPCXX_INCLUDE_FILES cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h ) - if ("${LIBCXX_CXX_ABI}" STREQUAL "libstdc++") + if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++") set(_LIBSUPCXX_DEFINES "-DLIBSTDCXX") set(_LIBSUPCXX_LIBNAME stdc++) else() @@ -151,7 +154,7 @@ "-D__GLIBCXX__ ${_LIBSUPCXX_DEFINES}" "${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_INCLUDE_FILES}" "bits" ) -elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxabi") +elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi") if (LIBCXX_CXX_ABI_INTREE) # Link against just-built "cxxabi" target. set(CXXABI_LIBNAME cxxabi) @@ -162,11 +165,11 @@ setup_abi_lib("LIBCXX_LIBCXXABI_INCLUDE_PATHS" "" ${CXXABI_LIBNAME} "cxxabi.h" "" ) -elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxrt") +elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxrt") setup_abi_lib("LIBCXX_LIBCXXRT_INCLUDE_PATHS" "-DLIBCXXRT" "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" "" ) -elseif (NOT "${LIBCXX_CXX_ABI}" STREQUAL "none") +elseif (NOT "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none") message(FATAL_ERROR "Currently libstdc++, libsupc++, libcxxabi, libcxxrt and none are " "supported for c++ abi." Index: libcxx/trunk/test/lit.site.cfg.in =================================================================== --- libcxx/trunk/test/lit.site.cfg.in +++ libcxx/trunk/test/lit.site.cfg.in @@ -5,7 +5,7 @@ config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@" config.python_executable = "@PYTHON_EXECUTABLE@" config.enable_shared = @LIBCXX_ENABLE_SHARED@ -config.cxx_abi = "@LIBCXX_CXX_ABI@" +config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@" # Let the main config do the real work. lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg")