mirror of https://github.com/ecmwf/eccodes.git
CMake target set_latest_tables_version added
This commit is contained in:
parent
c85e5cb124
commit
68c74bd807
|
@ -4,6 +4,20 @@ if(HAVE_INSTALL_ECCODES_SAMPLES)
|
|||
install( FILES ${samples_files}
|
||||
DESTINATION ${ECCODES_SAMPLES_SUFF}
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ )
|
||||
|
||||
# # copy script installSamples.sh to samples folder
|
||||
# install( PROGRAMS installSamples.sh DESTINATION ${ECCODES_SAMPLES_SUFF} )
|
||||
|
||||
if(NOT HAVE_MEMFS)
|
||||
add_custom_target(set_latest_tables_version)
|
||||
add_custom_command(TARGET set_latest_tables_version
|
||||
POST_BUILD
|
||||
COMMAND bash -c "cd ${CMAKE_INSTALL_PREFIX}/${ECCODES_SAMPLES_SUFF}; for F in GRIB2.tmpl *_grib2.tmpl ; do grib_set -s tablesVersion=30 $F tmp; mv tmp $F; done"
|
||||
VERBATIM
|
||||
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${ECCODES_SAMPLES_SUFF}
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
foreach( tmpl ${samples_files} )
|
||||
|
|
Loading…
Reference in New Issue