CMAKE_CONFIGURE_DEPENDS cannot depend on files that don't exist in time of generation step
Let's say I have optional configuration kernel-like file that I want to cause regeneration with this statement:
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROJECT_BINARY_DIR}/.config)
If file already exists everything works as expected -> when i change .config cmake is reconfigured. However when file doesn't exist (when cmake is run first time) and I add/modify it then cmake is not reconfigured.
Basically the file is not added to variable CMAKE_MAKEFILE_DEPENDS in generated CMakeFiles/Makefile.cmake if it doesn't exist.
Any chance to make it work (without workarounds like dependency on directory or some fake files)?
Edited by Janusz Jankowski