From 80f57efcb72927f206c29f5affc8a43aace66730 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 30 Jun 2015 17:18:51 +0100 Subject: [PATCH] GRIB-786: cmake run is slow due to copying definitions to build dir --- definitions/CMakeLists.txt | 22 ++++++++++------------ examples/C/include.ctest.sh.in | 3 +-- examples/F90/include.ctest.sh.in | 3 +-- examples/python/include.ctest.sh.in | 3 +-- tests/include.ctest.sh.in | 3 +-- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/definitions/CMakeLists.txt b/definitions/CMakeLists.txt index 031fb847f..d5e0c5440 100644 --- a/definitions/CMakeLists.txt +++ b/definitions/CMakeLists.txt @@ -20,15 +20,13 @@ install( DIRECTORY budg bufr cdf common grib1 grib2 gts mars metar tide hdf5 wr PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ ) # copy the definitions to the build directory - -file( COPY ${definition_files} ${table_files} ${text_files} - DESTINATION ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/definitions ) - -file( COPY budg bufr cdf common grib1 grib2 gts mars metar tide hdf5 wrap - DESTINATION ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/definitions - FILES_MATCHING - PATTERN "*.def" - PATTERN "*.txt" - PATTERN "*.list" - PATTERN "*.table" - PATTERN "4.2.192.*.table" EXCLUDE ) +#file( COPY ${definition_files} ${table_files} ${text_files} +# DESTINATION ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/definitions ) +#file( COPY budg bufr cdf common grib1 grib2 gts mars metar tide hdf5 wrap +# DESTINATION ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/definitions +# FILES_MATCHING +# PATTERN "*.def" +# PATTERN "*.txt" +# PATTERN "*.list" +# PATTERN "*.table" +# PATTERN "4.2.192.*.table" EXCLUDE ) diff --git a/examples/C/include.ctest.sh.in b/examples/C/include.ctest.sh.in index 28b292331..cd0e412ca 100644 --- a/examples/C/include.ctest.sh.in +++ b/examples/C/include.ctest.sh.in @@ -10,8 +10,7 @@ fi proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data -# use definitions from binary dir to test if installation will be correct -def_dir="@CMAKE_BINARY_DIR@/share/@PROJECT_NAME@/definitions" +def_dir="@PROJECT_SOURCE_DIR@/definitions" ECCODES_DEFINITION_PATH="${def_dir}" export ECCODES_DEFINITION_PATH diff --git a/examples/F90/include.ctest.sh.in b/examples/F90/include.ctest.sh.in index 4e86c5147..61053cc97 100644 --- a/examples/F90/include.ctest.sh.in +++ b/examples/F90/include.ctest.sh.in @@ -10,8 +10,7 @@ fi proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data -# use definitions from binary dir to test if installation will be correct -def_dir="@CMAKE_BINARY_DIR@/share/@PROJECT_NAME@/definitions" +def_dir="@PROJECT_SOURCE_DIR@/definitions" ECCODES_DEFINITION_PATH="${def_dir}" export ECCODES_DEFINITION_PATH diff --git a/examples/python/include.ctest.sh.in b/examples/python/include.ctest.sh.in index e3af05857..f8b7af33c 100644 --- a/examples/python/include.ctest.sh.in +++ b/examples/python/include.ctest.sh.in @@ -10,8 +10,7 @@ fi proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data -# use definitions from binary dir to test if installation will be correct -def_dir="@CMAKE_BINARY_DIR@/share/@PROJECT_NAME@/definitions" +def_dir="@PROJECT_SOURCE_DIR@/definitions" ECCODES_DEFINITION_PATH="${def_dir}" export ECCODES_DEFINITION_PATH diff --git a/tests/include.ctest.sh.in b/tests/include.ctest.sh.in index cb1dd5a68..74a93a684 100644 --- a/tests/include.ctest.sh.in +++ b/tests/include.ctest.sh.in @@ -10,8 +10,7 @@ fi proj_dir=@PROJECT_SOURCE_DIR@ data_dir=@PROJECT_BINARY_DIR@/data -# use definitions from binary dir to test if installation will be correct -def_dir="@CMAKE_BINARY_DIR@/share/@PROJECT_NAME@/definitions" +def_dir="@PROJECT_SOURCE_DIR@/definitions" ECCODES_DEFINITION_PATH="${def_dir}" export ECCODES_DEFINITION_PATH