[libcxx] r323143 - [cmake] [libcxx] Fix find_path() problems when cross compiling.
Don Hinton via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 22 11:26:38 PST 2018
Author: dhinton
Date: Mon Jan 22 11:26:38 2018
New Revision: 323143
URL: http://llvm.org/viewvc/llvm-project?rev=323143&view=rev
Log:
[cmake] [libcxx] Fix find_path() problems when cross compiling.
When CMAKE_SYSROOT or CMAKE_FIND_ROOT_PATH is set, cmake
recommends setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
globally which means find_path() always prepends CMAKE_SYSROOT or
CMAKE_FIND_ROOT_PATH to all paths used in the search.
However, this find_path() invocation is looking for a path in the
libcxxabi project on the host system, not the target system,
which can be done by passing NO_CMAKE_FIND_ROOT_PATH.
Differential Revision: https://reviews.llvm.org/D41622
Modified:
libcxx/trunk/CMakeLists.txt
Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=323143&r1=323142&r2=323143&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Mon Jan 22 11:26:38 2018
@@ -123,6 +123,7 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include
${LLVM_MAIN_SRC_DIR}/../libcxxabi/include
NO_DEFAULT_PATH
+ NO_CMAKE_FIND_ROOT_PATH
)
if (LIBCXX_TARGETING_MSVC)
# FIXME: Figure out how to configure the ABI library on Windows.
More information about the cfe-commits
mailing list