From 0b69b1f43c8b803f0d5516b9c0aa8a75e7743699 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 3 Dec 2016 22:03:24 +0000 Subject: [PATCH] build: allow specifying the component to `llvm_install_symlink` Add an optional parameter to `llvm_install_symlink` which allows the symlink installation to be placed into a specific component rather than the default value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288600 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/AddLLVM.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index eb5ae8de56a5..7941ceda56a0 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -1254,7 +1254,7 @@ function(llvm_install_library_symlink name dest type) endfunction() function(llvm_install_symlink name dest) - cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN}) + cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN}) foreach(path ${CMAKE_MODULE_PATH}) if(EXISTS ${path}/LLVMInstallSymlink.cmake) set(INSTALL_SYMLINK ${path}/LLVMInstallSymlink.cmake) @@ -1262,10 +1262,14 @@ function(llvm_install_symlink name dest) endif() endforeach() - if(ARG_ALWAYS_GENERATE) - set(component ${dest}) + if(ARG_COMPONENT) + set(component ${ARG_COMPONENT}) else() - set(component ${name}) + if(ARG_ALWAYS_GENERATE) + set(component ${dest}) + else() + set(component ${name}) + endif() endif() set(full_name ${name}${CMAKE_EXECUTABLE_SUFFIX})