[CMake] file dependency not working in external projects
hex
hex7c3 at gmail.com
Tue Sep 24 09:23:52 EDT 2019
hello,
I have a problem with a build step.
The following command is run every time somefile changes:
add_custom_command( OUTPUT out.put
COMMAND touch out.put
DEPENDS somefile.txt
)
add_custom_target( sometarget DEPENDS out.put )
I move this snippet inside an external project (with
ExternalProject_Add) and the custom command is only run once at build.
I am using absolute path to somefile, the command is not rebuild
changing somefile.
I am using Gnu make generator and build with make all
What am I missing?
More information about the CMake
mailing list