From 6a31fdedbc4bf963f1967ec03706f00aefd0ea0e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 24 Sep 2015 16:05:30 +0100 Subject: [PATCH] GRIB-838: CMake: IFS sample files not copied to build directory --- ifs_samples/grib1/CMakeLists.txt | 6 +++++- ifs_samples/grib1_mlgrib2/CMakeLists.txt | 4 ++++ ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt | 6 +++++- ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt | 6 +++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ifs_samples/grib1/CMakeLists.txt b/ifs_samples/grib1/CMakeLists.txt index b8de44d61..22bebd739 100644 --- a/ifs_samples/grib1/CMakeLists.txt +++ b/ifs_samples/grib1/CMakeLists.txt @@ -7,9 +7,13 @@ list( APPEND ifs_samples_${_basedir} sh_sfc.tmpl ) -install( FILES ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} +install( FILES ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} DESTINATION ${CMAKE_INSTALL_PREFIX}/${ECCODES_IFS_SAMPLES_SUFF}/${_basedir} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) file( COPY ${ifs_samples_${_basedir}} DESTINATION ${CMAKE_BINARY_DIR}/${ECCODES_IFS_SAMPLES_SUFF}/${_basedir} ) + +# Also copy the ifs sample files to the build dir (for developer mode) +file( COPY ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/ifs_samples/grib1_mlgrib2/CMakeLists.txt b/ifs_samples/grib1_mlgrib2/CMakeLists.txt index 8f250df15..318700543 100644 --- a/ifs_samples/grib1_mlgrib2/CMakeLists.txt +++ b/ifs_samples/grib1_mlgrib2/CMakeLists.txt @@ -13,3 +13,7 @@ install( FILES ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} file( COPY ${ifs_samples_${_basedir}} DESTINATION ${CMAKE_BINARY_DIR}/${ECCODES_IFS_SAMPLES_SUFF}/${_basedir} ) + +# Also copy the ifs sample files to the build dir (for developer mode) +file( COPY ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt b/ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt index 87e01f1c6..500f3d497 100644 --- a/ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt +++ b/ifs_samples/grib1_mlgrib2_ieee32/CMakeLists.txt @@ -7,9 +7,13 @@ list( APPEND ifs_samples_${_basedir} sh_sfc.tmpl ) -install( FILES ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} +install( FILES ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} DESTINATION ${ECCODES_IFS_SAMPLES_PATH}/${_basedir} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) file( COPY ${ifs_samples_${_basedir}} DESTINATION ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/ifs_samples/${_basedir} ) + +# Also copy the ifs sample files to the build dir (for developer mode) +file( COPY ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt b/ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt index df8ec7382..b3dee95ea 100644 --- a/ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt +++ b/ifs_samples/grib1_mlgrib2_ieee64/CMakeLists.txt @@ -7,9 +7,13 @@ list( APPEND ifs_samples_${_basedir} sh_sfc.tmpl ) -install( FILES ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} +install( FILES ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} DESTINATION ${CMAKE_INSTALL_PREFIX}/${ECCODES_IFS_SAMPLES_SUFF}/${_basedir} PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) file( COPY ${ifs_samples_${_basedir}} DESTINATION ${CMAKE_BINARY_DIR}/${ECCODES_IFS_SAMPLES_SUFF}/${_basedir} ) + +# Also copy the ifs sample files to the build dir (for developer mode) +file( COPY ${ECCODES_SAMPLES_FILES} ${ifs_samples_${_basedir}} + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )