I get this warning
CMake Warning (dev) at C:/Data/Projects/QtBuildTools/utils.cmake:670 (add_custom_command):
+ CategoryInfo : NotSpecified: (CMake Warning (…ustom_command)::String) , RemoteException
+ FullyQualifiedErrorId : NativeCommandError
+ PSComputerName : localhost
The following keywords are not supported when using
add_custom_command(TARGET): DEPENDS.
NotSpecified: (:String) , RemoteException
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.
Call Stack (most recent call first):
C:/Data/Projects/QtBuildTools/build.cmake:371 (UTILSF_CopyArtefactsToMain)
CMakeLists.txt:11 (UTILSF_BuildLibrary)
now according to the docs of 4.0.2 DEPENDS is a valid keyword.
this is the cmake code
foreach( a IN LISTS ${_Artefacts} )
add_custom_command(
TARGET ${tgt}
POST_BUILD
DEPENDS ${OPTS_SOURCEDIR}/${a}
COMMAND ${CMAKE_COMMAND}
"-DTO_COPY=${OPTS_SOURCEDIR}/${a}"
"-DCOPY_TO=${${_DestDir}}"
-P ${QtBuildtoolsDir}/copy_if_exists.cmake
VERBATIM )
endforeach()