[libcxx-commits] [PATCH] D114248: [libc++] Improve CMake include directory search.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 19 07:46:17 PST 2021


Mordante created this revision.
Mordante added a reviewer: ldionne.
Herald added a subscriber: mgorny.
Mordante requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This patch has been tested in D70631 <https://reviews.llvm.org/D70631>, but it should be reviewed
separately.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114248

Files:
  libcxx/src/CMakeLists.txt


Index: libcxx/src/CMakeLists.txt
===================================================================
--- libcxx/src/CMakeLists.txt
+++ libcxx/src/CMakeLists.txt
@@ -197,6 +197,7 @@
 # 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 @@
 # 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114248.388501.patch
Type: text/x-patch
Size: 961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211119/18bc49e9/attachment-0001.bin>


More information about the libcxx-commits mailing list