Making configuration files trigger configure (#3620)

This commit is contained in:
M Starch 2025-05-15 09:51:27 -07:00 committed by GitHub
parent 7e7861e462
commit 99da827ffb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,12 +83,14 @@ function(fprime__internal_process_configuration_source_set MODULE_NAME SOURCE_SE
fprime_cmake_debug_message("[config] Overriding ${DESTINATION} with ${SOURCE}")
file(COPY_FILE "${SOURCE}" "${DESTINATION}" ONLY_IF_DIFFERENT)
list(APPEND NEW_DEPENDS "${DESTINATION_MODULE}")
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${SOURCE}")
# If the source is new, move it to the binary directory
else()
fprime_cmake_debug_message("[config] Initial config ${DESTINATION} from ${SOURCE}")
list(APPEND RETURNED_SOURCES "${DESTINATION}")
file(MAKE_DIRECTORY "${DESTINATION_DIRECTORY}")
file(COPY_FILE "${SOURCE}" "${DESTINATION}" ONLY_IF_DIFFERENT)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${SOURCE}")
endif()
endforeach()
set(PROCESSED_SOURCES "${RETURNED_SOURCES}" PARENT_SCOPE)