aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-09-29 20:14:39 +0800
committerJia Tan <jiat0218@gmail.com>2023-10-31 18:44:59 +0800
commit8fdc71a27d07b10a3da52432432e080b6d577642 (patch)
tree169a4644094113b53e8391e90da4b19e06fdbb76
parentCMake: Fix Windows build with Clang/LLVM 17. (diff)
downloadxz-8fdc71a27d07b10a3da52432432e080b6d577642.tar.xz
CMake: Rename xz and man page symlink custom targets.
The Ninja Generator for CMake cannot have a custom target and its BYPRODUCTS have the same name. This has prevented Ninja builds on Unix-like systems since the xz symlinks were introduced in 80a1a8bb838842a2be343bd88ad1462c21c5e2c9.
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c3b6b33..d329c25f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1234,7 +1234,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
# even on Windows the symlink can still be executed without
# the .exe extension.
foreach(LINK IN LISTS XZ_LINKS)
- add_custom_target("${LINK}" ALL
+ add_custom_target("create_${LINK}" ALL
"${CMAKE_COMMAND}" -E create_symlink
"$<TARGET_FILE_NAME:xz>" "${LINK}"
BYPRODUCTS "${LINK}"
@@ -1247,7 +1247,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
# created broken. The symlinks will not be valid until install
# so they cannot be created on these system environments.
if(ALLOW_BROKEN_SYMLINKS)
- add_custom_target("${LINK}.1" ALL
+ add_custom_target("create_${LINK}.1" ALL
"${CMAKE_COMMAND}" -E create_symlink "xz.1" "${LINK}.1"
BYPRODUCTS "${LINK}.1"
VERBATIM)
@@ -1259,7 +1259,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
# cannot be made. This ensures parallel builds do not fail
# since it will enforce the order of creating xz first, then
# the symlinks.
- add_dependencies("${LINK}" xz)
+ add_dependencies("create_${LINK}" xz)
endif()
endforeach()
endif()