From 596be1328a2582a73c13446c027237378015c9b9 Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Tue, 11 Feb 2025 10:04:36 -0800 Subject: [PATCH] Remove DEPENDS from add_custom_command as CMake made the behavior clear (#2178) ### Description of changes: Instead of silently ignoring the parameter CMake now prints a warning and lets the command continue to work: ``` CMake Warning (dev) at crypto/CMakeLists.txt:654 (add_custom_command): The following keywords are not supported when using add_custom_command(TARGET): DEPENDS. Policy CMP0175 is not set: add_custom_command() rejects invalid arguments. Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy command to set the policy and suppress this warning. ``` https://cmake.org/cmake/help/latest/policy/CMP0175.html ### Testing: Built locally after deleting the option and didn't see the error message. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license. --- crypto/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index d76c077130..a2d4476327 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -657,10 +657,6 @@ if(FIPS_SHARED) COMMAND ${GO_EXECUTABLE} run ${PROJECT_SOURCE_DIR}/util/fipstools/inject_hash/inject_hash.go -o $ -in-object $ ${INJECT_HASH_APPLE_FLAG} - # The DEPENDS argument to a POST_BUILD rule appears to be ignored. Thus - # go_executable isn't used (as it doesn't get built), but we list this - # dependency anyway in case it starts working in some CMake version. - DEPENDS ../util/fipstools/inject_hash/inject_hash.go WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} )