[polly] [polly] Create component and install target in add_polly_library (PR #66598)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 17 08:24:18 PDT 2023


https://github.com/vimproved created https://github.com/llvm/llvm-project/pull/66598

Currently there's no component for LLVMPolly and PollyISL, however they are added to exports whether or not they are installed. This commit calls add_llvm_install_targets in the add_polly_library function to allow installation of LLVMPolly and PollyISL via distribution components, so they can be installed without also installing libPolly.a.

>From 30441ed51e279e223b0213e61c1f520ed3f6d30b Mon Sep 17 00:00:00 2001
From: Violet Purcell <vimproved at inventati.org>
Date: Sun, 17 Sep 2023 11:10:53 -0400
Subject: [PATCH] [polly] Create component and install target in
 add_polly_library

Currently there's no component for LLVMPolly and PollyISL, however
they are added to exports whether or not they are installed. This commit
calls add_llvm_install_targets in the add_polly_library function to
allow installation of LLVMPolly and PollyISL via distribution
components, so they can be installed without also installing libPolly.a.

Signed-off-by: Violet Purcell <vimproved at inventati.org>
---
 polly/cmake/polly_macros.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/polly/cmake/polly_macros.cmake b/polly/cmake/polly_macros.cmake
index 518a09b45a4205a..df541eeccc4cb51 100644
--- a/polly/cmake/polly_macros.cmake
+++ b/polly/cmake/polly_macros.cmake
@@ -43,9 +43,12 @@ macro(add_polly_library name)
   endif( LLVM_LINK_COMPONENTS )
   if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
     install(TARGETS ${name}
+      COMPONENT ${name}
       EXPORT LLVMExports
       LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
       ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+    add_llvm_install_targets(install-${name}
+      COMPONENT ${name})
   endif()
   set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
 endmacro(add_polly_library)



More information about the llvm-commits mailing list