[libcxx-commits] [PATCH] D97341: [libc++] Use generator expression to simplify the CMake code

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 23 15:27:43 PST 2021


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

A comment was left for when we would require CMake >= 3, which we do now.
I expect this should be a NFC.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97341

Files:
  libcxx/src/CMakeLists.txt


Index: libcxx/src/CMakeLists.txt
===================================================================
--- libcxx/src/CMakeLists.txt
+++ libcxx/src/CMakeLists.txt
@@ -379,9 +379,7 @@
 # NOTE: This install command must go after the cxx install command otherwise
 # it will not be executed after the library symlinks are installed.
 if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
-  # Replace the libc++ filename with $<TARGET_LINKER_FILE:cxx>
-  # after we required CMake 3.0.
-  install(FILES "${LIBCXX_LIBRARY_DIR}/libc++${CMAKE_SHARED_LIBRARY_SUFFIX}"
+  install(FILES "$<TARGET_LINKER_FILE:cxx>"
     DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR}
     COMPONENT libcxx)
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97341.325916.patch
Type: text/x-patch
Size: 715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210223/7689e01f/attachment.bin>


More information about the libcxx-commits mailing list