Fixes part of issue #1278

Moving a style header or touching it will now trigger a reconfiguration before
building, which triggers style files to be regenerated.
This commit is contained in:
Richard Berger 2019-02-17 20:53:21 -05:00
parent a8cee136fe
commit f25b06fab0
1 changed files with 2 additions and 0 deletions

View File

@ -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)