diff --git a/cmake/Modules/StyleHeaderUtils.cmake b/cmake/Modules/StyleHeaderUtils.cmake index a89d098dd0..a7b23b4cf1 100644 --- a/cmake/Modules/StyleHeaderUtils.cmake +++ b/cmake/Modules/StyleHeaderUtils.cmake @@ -50,6 +50,7 @@ function(CreateStyleHeader path filename) list(REMOVE_AT ARGV 0 1) set(header_list) foreach(FNAME ${ARGV}) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${FNAME}") get_filename_component(FNAME ${FNAME} NAME) list(APPEND header_list ${FNAME}) endforeach() @@ -61,6 +62,7 @@ function(CreateStyleHeader path filename) message(STATUS "Generating ${filename}...") file(WRITE "${path}/${filename}.tmp" "${temp}" ) execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${path}/${filename}.tmp" "${path}/${filename}") + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${path}/${filename}") endfunction(CreateStyleHeader) function(GenerateStyleHeader path property style)