From: Shoaib Meenai Date: Sat, 30 Jun 2018 01:25:47 +0000 (+0000) Subject: [libc++abi] Look for __config instead of vector X-Git-Tag: llvmorg-7.0.0-rc1~2469 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51d5cc9228f8ef283d6e80a88634f68e37211b7e;p=platform%2Fupstream%2Fllvm.git [libc++abi] Look for __config instead of vector vector is a generic C++ header, whereas __config is libc++-specific, so we can look for it instead to guarantee we're finding a libc++ installation. This was suggested by Eric in https://reviews.llvm.org/D48694. This is less important now that we're limiting the header search to the specified directories (which definitely shouldn't have any other C++ library's headers anyway), but it shouldn't hurt either. There's a chance some other library could also be providing a __config header, so there's still a trade-off there. It would be ideal if we could check for the presence of both __config and vector in the same directory, but there doesn't seem to be any easy way to do that in CMake. llvm-svn: 336034 --- diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index f8892e5..383bf96 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -110,7 +110,7 @@ endforeach() find_path( LIBCXXABI_LIBCXX_INCLUDES - vector + __config PATHS ${LIBCXXABI_LIBCXX_INCLUDES} ${LIBCXXABI_LIBCXX_PATH}/include ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBCXX_INCLUDES}