libcellml icon indicating copy to clipboard operation
libcellml copied to clipboard

CMake: cannot use `DEPENDS` with `add_custom_command(TARGET ...)`

Open agarny opened this issue 5 months ago • 0 comments

We are currently using the DEPENDS argument in a call to add_custom_command(TARGET ...) in src/bindings/python/CMakeLists.txt. However, that argument is invalid as reported by CMake:

CMake Warning (dev) at src/bindings/python/CMakeLists.txt:170 (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.

agarny avatar Jul 10 '25 10:07 agarny