diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2020-07-14 16:04:56 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2020-07-14 16:04:56 +0200 |
commit | 9f78677281b8866a28af469dc7f437771f2a1b8f (patch) | |
tree | 24adc110502306655a746426815b0f11ea406538 | |
parent | f21ca6d73dacc277e0b3d7a8fa15b2c30633d3ae (diff) |
CMake: Rename add_slaves() to add_links()
Sorry!
-rw-r--r-- | CMake/Misc.cmake | 18 | ||||
-rw-r--r-- | cmdline/CMakeLists.txt | 2 | ||||
-rw-r--r-- | methods/CMakeLists.txt | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/CMake/Misc.cmake b/CMake/Misc.cmake index 6ad0b9479..8cb18b6ac 100644 --- a/CMake/Misc.cmake +++ b/CMake/Misc.cmake @@ -51,17 +51,17 @@ function(add_vendor_file) endfunction() # Add symbolic links to a file -function(add_slaves destination master) - set(slaves "") - foreach(slave ${ARGN}) - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${slave} - COMMAND ${CMAKE_COMMAND} -E create_symlink ${master} ${CMAKE_CURRENT_BINARY_DIR}/${slave}) - list(APPEND slaves ${CMAKE_CURRENT_BINARY_DIR}/${slave}) +function(add_links directory target) + set(link_names "") + foreach(link_name ${ARGN}) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${link_name} + COMMAND ${CMAKE_COMMAND} -E create_symlink ${target} ${CMAKE_CURRENT_BINARY_DIR}/${link_name}) + list(APPEND link_names ${CMAKE_CURRENT_BINARY_DIR}/${link_name}) endforeach() - STRING(REPLACE "/" "-" master "${master}") - add_custom_target(${master}-slaves ALL DEPENDS ${slaves}) - install(FILES ${slaves} DESTINATION ${destination}) + STRING(REPLACE "/" "-" target "${target}") + add_custom_target(${target}-link_names ALL DEPENDS ${link_names}) + install(FILES ${link_names} DESTINATION ${directory}) endfunction() # Generates a simple version script versioning everything with current SOVERSION diff --git a/cmdline/CMakeLists.txt b/cmdline/CMakeLists.txt index d82239bee..91bf9bb0c 100644 --- a/cmdline/CMakeLists.txt +++ b/cmdline/CMakeLists.txt @@ -53,7 +53,7 @@ install(TARGETS apt-helper RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/) install(TARGETS apt-dump-solver apt-internal-solver RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/solvers) install(TARGETS apt-internal-planner RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/planners) -add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/planners ../solvers/dump planners/dump) +add_links(${CMAKE_INSTALL_LIBEXECDIR}/apt/planners ../solvers/dump planners/dump) # Install the not-to-be-compiled programs INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/apt-key DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/methods/CMakeLists.txt b/methods/CMakeLists.txt index 8589484cf..d575382f7 100644 --- a/methods/CMakeLists.txt +++ b/methods/CMakeLists.txt @@ -27,8 +27,8 @@ target_link_libraries(ftp ${GNUTLS_LIBRARIES}) install(TARGETS file copy store gpgv cdrom http ftp rred rsh mirror RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods) -add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods mirror mirror+ftp mirror+http mirror+https mirror+file mirror+copy) -add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods rsh ssh) +add_links(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods mirror mirror+ftp mirror+http mirror+https mirror+file mirror+copy) +add_links(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods rsh ssh) -add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods http https) +add_links(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods http https) |