summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2020-07-14 16:04:56 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2020-07-14 16:04:56 +0200
commit9f78677281b8866a28af469dc7f437771f2a1b8f (patch)
tree24adc110502306655a746426815b0f11ea406538
parentf21ca6d73dacc277e0b3d7a8fa15b2c30633d3ae (diff)
CMake: Rename add_slaves() to add_links()
Sorry!
-rw-r--r--CMake/Misc.cmake18
-rw-r--r--cmdline/CMakeLists.txt2
-rw-r--r--methods/CMakeLists.txt6
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)