[libcxx-commits] [libcxx] 5034d71 - [libc++] Use generator expression to simplify the CMake code

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 3 10:00:01 PST 2021


Author: Louis Dionne
Date: 2021-03-03T12:59:51-05:00
New Revision: 5034d7115df4fb07ab08cfaf6a671f6601c28408

URL: https://github.com/llvm/llvm-project/commit/5034d7115df4fb07ab08cfaf6a671f6601c28408
DIFF: https://github.com/llvm/llvm-project/commit/5034d7115df4fb07ab08cfaf6a671f6601c28408.diff

LOG: [libc++] Use generator expression to simplify the CMake code

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

Differential Revision: https://reviews.llvm.org/D97341

Added: 
    

Modified: 
    libcxx/src/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index cfb7eb1f7141..5dcf92a012ff 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -379,9 +379,7 @@ endif()
 # 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_shared>"
     DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR}
     COMPONENT libcxx)
 endif()


        


More information about the libcxx-commits mailing list