aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDDoSolitary <DDoSolitary@gmail.com>2021-02-05 14:06:56 +0800
committerJakub Jelen <jjelen@redhat.com>2021-08-17 15:46:54 +0200
commit3e51232c69c0e5e94a57de435f4ecfc000e2964c (patch)
tree9e251c9c813b8cd4e435c7b99c18f79be5288cf9
parentd8fea02d2bbdf5053ea8a6dc88241dfc69a4f91a (diff)
downloadlibssh-3e51232c69c0e5e94a57de435f4ecfc000e2964c.tar.gz
libssh-3e51232c69c0e5e94a57de435f4ecfc000e2964c.tar.xz
libssh-3e51232c69c0e5e94a57de435f4ecfc000e2964c.zip
cmake: Fix Ninja multiple rules error
Currently "cmake -G Ninja" complains about "multiple rules generate src/libssh_dev.map", because the target has the same name as the output of the custom command. Signed-off-by: DDoSolitary <DDoSolitary@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> (cherry picked from commit 1a24b424ef4a6ecd881434a32394ca3b41990f21)
-rw-r--r--cmake/Modules/FindABIMap.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/Modules/FindABIMap.cmake b/cmake/Modules/FindABIMap.cmake
index 756955c6..5117b498 100644
--- a/cmake/Modules/FindABIMap.cmake
+++ b/cmake/Modules/FindABIMap.cmake
@@ -469,12 +469,12 @@ function(generate_map_file _TARGET_NAME)
# a generated source
add_custom_command(
OUTPUT ${_MAP_OUTPUT_PATH}
- DEPENDS ${_TARGET_NAME}
+ DEPENDS ${_TARGET_NAME}_copy
)
if (DEFINED _generate_map_file_COPY_TO)
# Copy the generated map back to the COPY_TO
- add_custom_target(${_TARGET_NAME} ALL
+ add_custom_target(${_TARGET_NAME}_copy ALL
COMMAND
${CMAKE_COMMAND} -E copy_if_different ${_MAP_OUTPUT_PATH}
${_generate_map_file_COPY_TO}
@@ -483,7 +483,7 @@ function(generate_map_file _TARGET_NAME)
VERBATIM
)
else()
- add_custom_target(${_TARGET_NAME} ALL
+ add_custom_target(${_TARGET_NAME}_copy ALL
DEPENDS ${_TARGET_NAME}_int
)
endif()