forked from lijiext/lammps
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:
parent
a8cee136fe
commit
f25b06fab0
|
@ -50,6 +50,7 @@ function(CreateStyleHeader path filename)
|
||||||
list(REMOVE_AT ARGV 0 1)
|
list(REMOVE_AT ARGV 0 1)
|
||||||
set(header_list)
|
set(header_list)
|
||||||
foreach(FNAME ${ARGV})
|
foreach(FNAME ${ARGV})
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${FNAME}")
|
||||||
get_filename_component(FNAME ${FNAME} NAME)
|
get_filename_component(FNAME ${FNAME} NAME)
|
||||||
list(APPEND header_list ${FNAME})
|
list(APPEND header_list ${FNAME})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -61,6 +62,7 @@ function(CreateStyleHeader path filename)
|
||||||
message(STATUS "Generating ${filename}...")
|
message(STATUS "Generating ${filename}...")
|
||||||
file(WRITE "${path}/${filename}.tmp" "${temp}" )
|
file(WRITE "${path}/${filename}.tmp" "${temp}" )
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${path}/${filename}.tmp" "${path}/${filename}")
|
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)
|
endfunction(CreateStyleHeader)
|
||||||
|
|
||||||
function(GenerateStyleHeader path property style)
|
function(GenerateStyleHeader path property style)
|
||||||
|
|
Loading…
Reference in New Issue