[libcxx-commits] [libcxx] cc9fded - [libc++] Improve CMake include directory search.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 22 08:35:53 PST 2021
Author: Mark de Wever
Date: 2021-11-22T17:35:49+01:00
New Revision: cc9fdedba7c9b19fed24a7b67f63a3a2e7a729bd
URL: https://github.com/llvm/llvm-project/commit/cc9fdedba7c9b19fed24a7b67f63a3a2e7a729bd
DIFF: https://github.com/llvm/llvm-project/commit/cc9fdedba7c9b19fed24a7b67f63a3a2e7a729bd.diff
LOG: [libc++] Improve CMake include directory search.
This patch has been tested in D70631, but it should be reviewed
separately.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D114248
Added:
Modified:
libcxx/src/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index d52c530e1bd6..c0e87bbcf342 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -197,6 +197,7 @@ split_list(LIBCXX_LINK_FLAGS)
# Build the shared library.
if (LIBCXX_ENABLE_SHARED)
add_library(cxx_shared SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
+ target_include_directories(cxx_shared PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(cxx_shared PUBLIC cxx-headers
PRIVATE ${LIBCXX_LIBRARIES})
set_target_properties(cxx_shared
@@ -275,6 +276,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
# Build the static library.
if (LIBCXX_ENABLE_STATIC)
add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
+ target_include_directories(cxx_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(cxx_static PUBLIC cxx-headers
PRIVATE ${LIBCXX_LIBRARIES})
set_target_properties(cxx_static
More information about the libcxx-commits
mailing list