From 07b14c8e2ed288dfca382719aeb26d544573f51a Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 8 Nov 2024 17:16:43 +0100 Subject: build: specify POST_BUILD when using add_custom_command This is needed specifically for the second signature of add_custom_command, which appends an operation to an existing target. This will prevent the cmake warning CMP0175. Reference: https://cmake.org/cmake/help/latest/policy/CMP0175.html --- cmake/Util.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'cmake') diff --git a/cmake/Util.cmake b/cmake/Util.cmake index eb07bf07d5..8ca39e5f94 100644 --- a/cmake/Util.cmake +++ b/cmake/Util.cmake @@ -61,6 +61,7 @@ function(add_glob_target) if(NOT ARG_COMMAND) add_custom_target(${ARG_TARGET}) add_custom_command(TARGET ${ARG_TARGET} + POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo "${ARG_TARGET} SKIP: ${ARG_COMMAND} not found") return() endif() -- cgit