-
Couldn't load subscription status.
- Fork 10
Description
As noticed by @bena-nasa we have code like this:
file (GLOB_RECURSE rc_files CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.rc)
foreach ( file ${rc_files} )
get_filename_component( dir ${file} DIRECTORY )
install( FILES ${file} DESTINATION etc/${dir} )
endforeach()in a lot of places. We use it to copy over all the *.rc files under a directory into a similar directory tree in install/etc.
And @bena-nasa in his ExtData2G work would need to add *.yaml to all of these.
This leads to a couple things. First, this code might be better served with a CMake macro or function. We could do:
esma_copy_config_files()say and that would just copy over the files.
But should it be more..."general"? Like maybe:
esma_copy_config_files(*.rc *.yaml)or even:
esma_copy_config_files(*.rc *.yaml DESTINATION etc)so that we could do it to an arbitrary location with arbitrary files?
Then again, if our config files are all *.rc, *.yaml and maybe *.nml we could just hard code those and if a new file glob needs to be added, we do so in this repo in the macro and then boom, all works?