From f229ca8c28174e21758bbc0caabb28b96c4759a5 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Fri, 31 Jan 2025 11:05:58 +0900 Subject: [PATCH] fix: don't use DEPENDS with add_custom_command(TARGET) We can use DEPENDS for add_custom_command(OUTPUT) but can't use DEPENDS for add_custom_command(TARGET). See also the add_custom_command(TARGET) document: https://cmake.org/cmake/help/latest/command/add_custom_command.html#build-events If we use DEPENDS for add_custom_command(TARGET), the following warning is reported: The following keywords are not supported when using add_custom_command(TARGET): DEPENDS. --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23ef74369c9..4aad0a723f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -445,7 +445,6 @@ if (S2N_INTERN_LIBCRYPTO) # add all of the prefixed symbols to the archive add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD - DEPENDS libcrypto.symbols COMMAND bash -c "${CMAKE_AR} -r lib/libs2n.a s2n_libcrypto/*.o" VERBATIM