[emos] 10/13: new upstream 4.4.6
Alastair McKinstry
mckinstry at moszumanska.debian.org
Fri Mar 3 13:54:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository emos.
commit 964e109815e8d1b5ecd7cba9338a7ff1da14b382
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Tue Feb 21 06:27:41 2017 +0000
new upstream 4.4.6
---
CMakeLists.txt | 12 +-
ChangeLog | 9 +
VERSION.cmake | 2 +-
bamboo/INTEL-env.sh | 2 +-
bufrtables/B0000000000000025000.TXT | 1 -
bufrtables/B0000000000098025001.TXT | 1 -
bufrtables/B0000000000098025002.TXT | 1 -
bufrtables/B0000000000098025101.TXT | 1 -
bufrtables/C0000000000000025000.TXT | 1 -
bufrtables/C0000000000098025001.TXT | 1 -
bufrtables/C0000000000098025002.TXT | 1 -
bufrtables/C0000000000098025101.TXT | 1 -
bufrtables/D0000000000000025000.TXT | 1 -
bufrtables/D0000000000098025001.TXT | 1 -
bufrtables/D0000000000098025002.TXT | 1 -
bufrtables/D0000000000098025101.TXT | 1 -
cmake/FindADSM.cmake | 2 +-
cmake/FindAEC.cmake | 2 +-
cmake/FindAIO.cmake | 2 +-
cmake/FindArmadillo.cmake | 2 +-
cmake/FindCMath.cmake | 2 +-
cmake/FindDl.cmake | 2 +-
cmake/FindEMOS.cmake | 2 +-
cmake/FindFDB.cmake | 2 +-
cmake/FindFFTW.cmake | 2 +-
cmake/FindGeoTIFF.cmake | 2 +-
cmake/FindHPSS.cmake | 2 +-
cmake/FindLEX.cmake | 2 +-
cmake/FindLibGFortran.cmake | 2 +-
cmake/FindLibIFort.cmake | 2 +-
cmake/FindLustreAPI.cmake | 43 +++
cmake/FindMKL.cmake | 2 +-
cmake/FindNDBM.cmake | 2 +-
cmake/FindNetCDF.cmake | 2 +-
cmake/FindNetCDF3.cmake | 2 +-
cmake/FindODB.cmake | 2 +-
cmake/FindOpenCL.cmake | 2 +-
cmake/FindOpenJPEG.cmake | 2 +-
cmake/FindPGIFortran.cmake | 2 +-
cmake/FindPango.cmake | 2 +-
cmake/FindPangoCairo.cmake | 2 +-
cmake/FindREADLINE.cmake | 2 +-
cmake/FindRPCGEN.cmake | 2 +-
cmake/FindRealtime.cmake | 2 +-
cmake/FindSZip.cmake | 2 +-
cmake/FindTrilinos.cmake | 2 +-
cmake/FindViennaCL.cmake | 2 +-
cmake/FindXLFortranLibs.cmake | 2 +-
cmake/FindYACC.cmake | 2 +-
cmake/Findgrib_api.cmake | 2 +-
cmake/Findodb_api.cmake | 2 +-
cmake/Findspot.cmake | 2 +-
cmake/VERSION.cmake | 4 +-
cmake/compiler_flags/Clang_C.cmake | 2 +-
cmake/compiler_flags/Clang_CXX.cmake | 2 +-
cmake/compiler_flags/Cray_C.cmake | 2 +-
cmake/compiler_flags/Cray_CXX.cmake | 2 +-
cmake/compiler_flags/Cray_Fortran.cmake | 2 +-
cmake/compiler_flags/GNU_C.cmake | 2 +-
cmake/compiler_flags/GNU_CXX.cmake | 2 +-
cmake/compiler_flags/GNU_Fortran.cmake | 2 +-
cmake/compiler_flags/Intel_C.cmake | 2 +-
cmake/compiler_flags/Intel_CXX.cmake | 2 +-
cmake/compiler_flags/Intel_Fortran.cmake | 2 +-
cmake/compiler_flags/PGI_C.cmake | 2 +-
cmake/compiler_flags/PGI_CXX.cmake | 2 +-
cmake/compiler_flags/PGI_Fortran.cmake | 2 +-
cmake/ecbuild_add_c_flags.cmake | 2 +-
cmake/ecbuild_add_cxx11_flags.cmake | 2 +-
cmake/ecbuild_add_cxx_flags.cmake | 2 +-
cmake/ecbuild_add_executable.cmake | 70 +++--
cmake/ecbuild_add_extra_search_paths.cmake | 2 +-
cmake/ecbuild_add_fortran_flags.cmake | 2 +-
cmake/ecbuild_add_library.cmake | 80 ++---
cmake/ecbuild_add_option.cmake | 71 +++--
cmake/ecbuild_add_persistent.cmake | 2 +-
cmake/ecbuild_add_resources.cmake | 2 +-
cmake/ecbuild_add_test.cmake | 2 +-
cmake/ecbuild_append_to_rpath.cmake | 2 +-
cmake/ecbuild_bundle.cmake | 21 +-
cmake/ecbuild_cache.cmake | 2 +-
cmake/ecbuild_check_c_source_return.cmake | 2 +-
cmake/ecbuild_check_compiler.cmake | 2 +-
cmake/ecbuild_check_cxx11.cmake | 2 +-
cmake/ecbuild_check_cxx_source_return.cmake | 2 +-
cmake/ecbuild_check_fortran.cmake | 2 +-
cmake/ecbuild_check_fortran_source_return.cmake | 2 +-
cmake/ecbuild_check_functions.cmake | 2 +-
cmake/ecbuild_check_os.cmake | 335 ++++++++++-----------
cmake/ecbuild_compiler_flags.cmake | 8 +-
cmake/ecbuild_config.h.in | 2 +-
cmake/ecbuild_declare_project.cmake | 2 +-
cmake/ecbuild_define_build_types.cmake | 2 +-
cmake/ecbuild_define_libs_and_execs_target.cmake | 2 +-
cmake/ecbuild_define_links_target.cmake | 2 +-
cmake/ecbuild_define_options.cmake | 2 +-
cmake/ecbuild_define_paths.cmake | 2 +-
cmake/ecbuild_dont_pack.cmake | 2 +-
cmake/ecbuild_download_resource.cmake | 34 ++-
cmake/ecbuild_echo_targets.cmake | 2 +-
cmake/ecbuild_enable_fortran.cmake | 10 +-
cmake/ecbuild_features.cmake | 43 +--
cmake/ecbuild_find_fortranlibs.cmake | 2 +-
cmake/ecbuild_find_lexyacc.cmake | 2 +-
cmake/ecbuild_find_mpi.cmake | 2 +-
cmake/ecbuild_find_omp.cmake | 2 +-
cmake/ecbuild_find_package.cmake | 84 ++++--
cmake/ecbuild_find_perl.cmake | 2 +-
cmake/ecbuild_find_python.cmake | 55 +++-
cmake/ecbuild_generate_config_headers.cmake | 2 +-
cmake/ecbuild_generate_fortran_interfaces.cmake | 2 +-
cmake/ecbuild_generate_rpc.cmake | 2 +-
cmake/ecbuild_generate_yy.cmake | 2 +-
cmake/ecbuild_get_cxx11_flags.cmake | 2 +-
cmake/ecbuild_get_date.cmake | 2 +-
cmake/ecbuild_get_resources.cmake | 2 +-
cmake/ecbuild_get_test_data.cmake | 21 +-
cmake/ecbuild_git.cmake | 2 +-
cmake/ecbuild_install_project.cmake | 37 ++-
cmake/ecbuild_list_add_pattern.cmake | 2 +-
cmake/ecbuild_list_exclude_pattern.cmake | 2 +-
cmake/ecbuild_list_extra_search_paths.cmake | 2 +-
cmake/ecbuild_list_macros.cmake | 2 +-
cmake/ecbuild_log.cmake | 46 +--
cmake/ecbuild_pkgconfig.cmake | 2 +-
cmake/ecbuild_policies.cmake | 2 +-
cmake/ecbuild_print_summary.cmake | 18 +-
cmake/ecbuild_project_files.cmake | 2 +-
cmake/ecbuild_remove_fortran_flags.cmake | 2 +-
cmake/ecbuild_requires_macro_version.cmake | 2 +-
cmake/ecbuild_separate_sources.cmake | 26 +-
cmake/ecbuild_source_flags.cmake | 2 +-
cmake/ecbuild_system.cmake | 14 +-
cmake/ecbuild_target_flags.cmake | 2 +-
cmake/ecbuild_use_package.cmake | 57 +++-
cmake/ecbuild_version.h.in | 2 +-
cmake/ecbuild_warn_unused_files.cmake | 2 +-
cmake/gen_source_flags.py | 2 +-
cmake/include/ecbuild/boost_test_framework.h | 2 +-
cmake/sg.pl | 2 +-
pbio/emosnum.F | 2 +-
share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake | 14 +-
share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake | 14 +-
share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake | 14 +-
.../bufr/regress/download_tests_bufr_src_files.txt | 1 +
145 files changed, 833 insertions(+), 534 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a848bd..247e798 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}
include( ecbuild_system NO_POLICY_SCOPE )
-ecbuild_requires_macro_version( 1.9 )
+ecbuild_requires_macro_version( 2.6 )
ecbuild_add_option( FEATURE INSTALL_TABLES DESCRIPTION "install BUFR/GRIBex/LSM tables" DEFAULT ON )
ecbuild_add_option( FEATURE INSTALL_TOOLS DESCRIPTION "install BUFR/GRIBex tools" DEFAULT ON )
@@ -111,8 +111,13 @@ endif()
################################################################################
# extra packages and projects
+ecbuild_debug_var(CMAKE_PREFIX_PATH)
+set( ECCODES_FAIL_MSG
+ "Note: grib_api can be used instead (select with -DENABLE_ECCODES=OFF), "
+ "but we strongly advise you to upgrade to ecCodes. "
+ "See https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home\n" )
ecbuild_add_option( FEATURE ECCODES DESCRIPTION "Use eccodes instead of grib_api"
- REQUIRED_PACKAGES "PROJECT eccodes VERSION 0.14 REQUIRED"
+ REQUIRED_PACKAGES "PROJECT eccodes VERSION 0.14 REQUIRED FAILURE_MSG ECCODES_FAIL_MSG"
DEFAULT ON )
if( HAVE_ECCODES)
@@ -122,7 +127,8 @@ if( HAVE_ECCODES)
set( grib_api_BASE_DIR ${eccodes_BASE_DIR} )
set( grib_handling_pkg eccodes )
else()
- ecbuild_use_package( PROJECT grib_api VERSION 1.14.3 REQUIRED )
+ ecbuild_use_package( PROJECT grib_api VERSION 1.14.3 REQUIRED
+ FAILURE_MSG "We strongly advise to use ecCodes (enable with -DENABLE_ECCODES=ON)" )
set( grib_handling_pkg grib_api )
endif()
diff --git a/ChangeLog b/ChangeLog
index b6c227e..058e6a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+000446
+
+ Notes
+ * This release is part of ECMWF Development Section Synchronised Release 2017.01
+ * This version of libemos was tested against BUFR tables version 000410 (WMO tables 27, released Nov 2016), please check also changes of the previous version 000442
+
+ Bug fixes
+ * [ECC-414] - include sample BUFR file with the new Sentinel 1 descriptors
+
000445
Notes
diff --git a/VERSION.cmake b/VERSION.cmake
index 1340633..eac8765 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -2,4 +2,4 @@
# Do NOT forget to update pbio/emosnum.F
#
#
-set( ${PROJECT_NAME}_VERSION_STR "4.4.5" )
+set( ${PROJECT_NAME}_VERSION_STR "4.4.6" )
diff --git a/bamboo/INTEL-env.sh b/bamboo/INTEL-env.sh
index 911ad2e..1e59c76 100644
--- a/bamboo/INTEL-env.sh
+++ b/bamboo/INTEL-env.sh
@@ -12,4 +12,4 @@ module unload grib_api
module unload emos
module unload fftw
module unload libemos
-module switch gnu intel/15.0.2
+module switch gnu intel/16.0.3
diff --git a/bufrtables/B0000000000000025000.TXT b/bufrtables/B0000000000000025000.TXT
deleted file mode 120000
index 2755a43..0000000
--- a/bufrtables/B0000000000000025000.TXT
+++ /dev/null
@@ -1 +0,0 @@
-B_4851e63ae80dfa0465a5c0accadb59c7.distinct
\ No newline at end of file
diff --git a/bufrtables/B0000000000098025001.TXT b/bufrtables/B0000000000098025001.TXT
deleted file mode 120000
index ce4292a..0000000
--- a/bufrtables/B0000000000098025001.TXT
+++ /dev/null
@@ -1 +0,0 @@
-B_447ec2596e66dd32d2e9f75206ecf377.distinct
\ No newline at end of file
diff --git a/bufrtables/B0000000000098025002.TXT b/bufrtables/B0000000000098025002.TXT
deleted file mode 120000
index dcafd1b..0000000
--- a/bufrtables/B0000000000098025002.TXT
+++ /dev/null
@@ -1 +0,0 @@
-B_743c8d7004186d6caa4cc90f3b2fada1.distinct
\ No newline at end of file
diff --git a/bufrtables/B0000000000098025101.TXT b/bufrtables/B0000000000098025101.TXT
deleted file mode 120000
index 085d255..0000000
--- a/bufrtables/B0000000000098025101.TXT
+++ /dev/null
@@ -1 +0,0 @@
-B_f10ebfdd137c45c773fb05ae41c11aac.distinct
\ No newline at end of file
diff --git a/bufrtables/C0000000000000025000.TXT b/bufrtables/C0000000000000025000.TXT
deleted file mode 120000
index 3e9cece..0000000
--- a/bufrtables/C0000000000000025000.TXT
+++ /dev/null
@@ -1 +0,0 @@
-C_cbbfb0961719d91837e879725606f888.distinct
\ No newline at end of file
diff --git a/bufrtables/C0000000000098025001.TXT b/bufrtables/C0000000000098025001.TXT
deleted file mode 120000
index 5ad28a9..0000000
--- a/bufrtables/C0000000000098025001.TXT
+++ /dev/null
@@ -1 +0,0 @@
-C_28dcf02601e27183968edca962cea54b.distinct
\ No newline at end of file
diff --git a/bufrtables/C0000000000098025002.TXT b/bufrtables/C0000000000098025002.TXT
deleted file mode 120000
index 2b7df96..0000000
--- a/bufrtables/C0000000000098025002.TXT
+++ /dev/null
@@ -1 +0,0 @@
-C_0af6a5953f106b2e629790deb9e5d160.distinct
\ No newline at end of file
diff --git a/bufrtables/C0000000000098025101.TXT b/bufrtables/C0000000000098025101.TXT
deleted file mode 120000
index 13f2bcf..0000000
--- a/bufrtables/C0000000000098025101.TXT
+++ /dev/null
@@ -1 +0,0 @@
-C_52e7c7c26f18619d3a5aab4622ff5ded.distinct
\ No newline at end of file
diff --git a/bufrtables/D0000000000000025000.TXT b/bufrtables/D0000000000000025000.TXT
deleted file mode 120000
index 4f010bf..0000000
--- a/bufrtables/D0000000000000025000.TXT
+++ /dev/null
@@ -1 +0,0 @@
-D_b907356b269f584470d86dd66c0c511b.distinct
\ No newline at end of file
diff --git a/bufrtables/D0000000000098025001.TXT b/bufrtables/D0000000000098025001.TXT
deleted file mode 120000
index 3298614..0000000
--- a/bufrtables/D0000000000098025001.TXT
+++ /dev/null
@@ -1 +0,0 @@
-D_37330e819864b322b4bd32c5637e6c3f.distinct
\ No newline at end of file
diff --git a/bufrtables/D0000000000098025002.TXT b/bufrtables/D0000000000098025002.TXT
deleted file mode 120000
index 8349734..0000000
--- a/bufrtables/D0000000000098025002.TXT
+++ /dev/null
@@ -1 +0,0 @@
-D_30035205012784a0c6916eebd0384d27.distinct
\ No newline at end of file
diff --git a/bufrtables/D0000000000098025101.TXT b/bufrtables/D0000000000098025101.TXT
deleted file mode 120000
index 44cfd07..0000000
--- a/bufrtables/D0000000000098025101.TXT
+++ /dev/null
@@ -1 +0,0 @@
-D_67aa10c5ca69200995cb56453d1af238.distinct
\ No newline at end of file
diff --git a/cmake/FindADSM.cmake b/cmake/FindADSM.cmake
index b46e798..daadf0e 100644
--- a/cmake/FindADSM.cmake
+++ b/cmake/FindADSM.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindAEC.cmake b/cmake/FindAEC.cmake
index 717b2b5..0b0f69b 100644
--- a/cmake/FindAEC.cmake
+++ b/cmake/FindAEC.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindAIO.cmake b/cmake/FindAIO.cmake
index 76e357a..5dd9244 100644
--- a/cmake/FindAIO.cmake
+++ b/cmake/FindAIO.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindArmadillo.cmake b/cmake/FindArmadillo.cmake
index 4ef1a4a..dfe77a2 100644
--- a/cmake/FindArmadillo.cmake
+++ b/cmake/FindArmadillo.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindCMath.cmake b/cmake/FindCMath.cmake
index b8a2a0b..741728a 100644
--- a/cmake/FindCMath.cmake
+++ b/cmake/FindCMath.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindDl.cmake b/cmake/FindDl.cmake
index 16463c6..31e426f 100644
--- a/cmake/FindDl.cmake
+++ b/cmake/FindDl.cmake
@@ -1,4 +1,4 @@
-# © Copyright 1996-2016 ECMWF.
+# © Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindEMOS.cmake b/cmake/FindEMOS.cmake
index c549fc2..43f896e 100644
--- a/cmake/FindEMOS.cmake
+++ b/cmake/FindEMOS.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindFDB.cmake b/cmake/FindFDB.cmake
index 4bcbdf3..66879c1 100644
--- a/cmake/FindFDB.cmake
+++ b/cmake/FindFDB.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindFFTW.cmake b/cmake/FindFFTW.cmake
index b76afa5..d57c09a 100644
--- a/cmake/FindFFTW.cmake
+++ b/cmake/FindFFTW.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindGeoTIFF.cmake b/cmake/FindGeoTIFF.cmake
index 126bc46..7226f61 100644
--- a/cmake/FindGeoTIFF.cmake
+++ b/cmake/FindGeoTIFF.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindHPSS.cmake b/cmake/FindHPSS.cmake
index b2b662b..1cc829e 100644
--- a/cmake/FindHPSS.cmake
+++ b/cmake/FindHPSS.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindLEX.cmake b/cmake/FindLEX.cmake
index 221868f..b6ab838 100644
--- a/cmake/FindLEX.cmake
+++ b/cmake/FindLEX.cmake
@@ -44,7 +44,7 @@
# This file is based on the FindFLEX CMake macro, and adapted by ECMWF
#=============================================================================
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindLibGFortran.cmake b/cmake/FindLibGFortran.cmake
index a293ea5..7f9cc64 100644
--- a/cmake/FindLibGFortran.cmake
+++ b/cmake/FindLibGFortran.cmake
@@ -1,4 +1,4 @@
-# © Copyright 1996-2016 ECMWF.
+# © Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindLibIFort.cmake b/cmake/FindLibIFort.cmake
index da782a4..4c3e299 100644
--- a/cmake/FindLibIFort.cmake
+++ b/cmake/FindLibIFort.cmake
@@ -1,4 +1,4 @@
-# © Copyright 1996-2016 ECMWF.
+# © Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindLustreAPI.cmake b/cmake/FindLustreAPI.cmake
new file mode 100644
index 0000000..6db0ba2
--- /dev/null
+++ b/cmake/FindLustreAPI.cmake
@@ -0,0 +1,43 @@
+# (C) Copyright 1996-2017 ECMWF.
+#
+# This software is licensed under the terms of the Apache Licence Version 2.0
+# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
+# In applying this licence, ECMWF does not waive the privileges and immunities
+# granted to it by virtue of its status as an intergovernmental organisation
+# nor does it submit to any jurisdiction.
+
+# - Try to find lib Lustre API
+
+# usually installed on Cray systems under /opt/cray/lustre-cray_ari_s/default / create_test.c -L
+# .../include/lustre/lustreapi.h
+# .../lib64/liblustreapi.so
+
+# Once done this will define
+# LUSTREAPI_FOUND - System has LustreAPI
+# LUSTREAPI_INCLUDE_DIRS - The LustreAPI include directories
+# LUSTREAPI_LIBRARIES - The libraries needed to use LustreAPI
+#
+# The following paths will be searched with priority if set in CMake or env
+#
+# LUSTREAPI_DIR - prefix path of the LustreAPI installation
+# LUSTREAPI_PATH - prefix path of the LustreAPI installation
+
+find_path( LUSTREAPI_INCLUDE_DIR lustre/lustreapi.h
+ PATHS ${LUSTREAPI_DIR} ${LUSTREAPI_PATH} ENV LUSTREAPI_DIR ENV LUSTREAPI_PATH
+ PATH_SUFFIXES include NO_DEFAULT_PATH )
+
+find_path( LUSTREAPI_INCLUDE_DIR lustre/lustreapi.h PATH_SUFFIXES include )
+
+find_library( LUSTREAPI_LIBRARY NAMES lustreapi
+ PATHS ${LUSTREAPI_DIR} ${LUSTREAPI_PATH} ENV LUSTREAPI_DIR ENV LUSTREAPI_PATH
+ PATH_SUFFIXES lib lib64 NO_DEFAULT_PATH )
+find_library( LUSTREAPI_LIBRARY NAMES lustreapi PATH_SUFFIXES lib lib64 )
+
+set( LUSTREAPI_LIBRARIES ${LUSTREAPI_LIBRARY} )
+set( LUSTREAPI_INCLUDE_DIRS ${LUSTREAPI_INCLUDE_DIR} )
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(LUSTREAPI DEFAULT_MSG LUSTREAPI_LIBRARY LUSTREAPI_INCLUDE_DIR)
+
+mark_as_advanced(LUSTREAPI_INCLUDE_DIR LUSTREAPI_LIBRARY )
diff --git a/cmake/FindMKL.cmake b/cmake/FindMKL.cmake
index 5941179..59eaa60 100644
--- a/cmake/FindMKL.cmake
+++ b/cmake/FindMKL.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindNDBM.cmake b/cmake/FindNDBM.cmake
index 869223f..8cd350e 100644
--- a/cmake/FindNDBM.cmake
+++ b/cmake/FindNDBM.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindNetCDF.cmake b/cmake/FindNetCDF.cmake
index 9084549..69b88bd 100644
--- a/cmake/FindNetCDF.cmake
+++ b/cmake/FindNetCDF.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindNetCDF3.cmake b/cmake/FindNetCDF3.cmake
index 5519fd6..1783a72 100644
--- a/cmake/FindNetCDF3.cmake
+++ b/cmake/FindNetCDF3.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindODB.cmake b/cmake/FindODB.cmake
index 1beb5c8..7c35d6e 100644
--- a/cmake/FindODB.cmake
+++ b/cmake/FindODB.cmake
@@ -1,4 +1,4 @@
-# © Copyright 1996-2016 ECMWF.
+# © Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindOpenCL.cmake b/cmake/FindOpenCL.cmake
index 9b6e978..510a3a9 100644
--- a/cmake/FindOpenCL.cmake
+++ b/cmake/FindOpenCL.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindOpenJPEG.cmake b/cmake/FindOpenJPEG.cmake
index c660238..66d976e 100644
--- a/cmake/FindOpenJPEG.cmake
+++ b/cmake/FindOpenJPEG.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindPGIFortran.cmake b/cmake/FindPGIFortran.cmake
index e68bdf6..5d33239 100644
--- a/cmake/FindPGIFortran.cmake
+++ b/cmake/FindPGIFortran.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindPango.cmake b/cmake/FindPango.cmake
index 76e152a..f135864 100644
--- a/cmake/FindPango.cmake
+++ b/cmake/FindPango.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindPangoCairo.cmake b/cmake/FindPangoCairo.cmake
index 9979550..cb70737 100644
--- a/cmake/FindPangoCairo.cmake
+++ b/cmake/FindPangoCairo.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindREADLINE.cmake b/cmake/FindREADLINE.cmake
index 2ba08b4..a146c62 100644
--- a/cmake/FindREADLINE.cmake
+++ b/cmake/FindREADLINE.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindRPCGEN.cmake b/cmake/FindRPCGEN.cmake
index fd42e9f..42ed90c 100644
--- a/cmake/FindRPCGEN.cmake
+++ b/cmake/FindRPCGEN.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindRealtime.cmake b/cmake/FindRealtime.cmake
index 843a54f..78fa4c5 100644
--- a/cmake/FindRealtime.cmake
+++ b/cmake/FindRealtime.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindSZip.cmake b/cmake/FindSZip.cmake
index 925348c..f005546 100644
--- a/cmake/FindSZip.cmake
+++ b/cmake/FindSZip.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindTrilinos.cmake b/cmake/FindTrilinos.cmake
index 0d99b54..b1584f8 100644
--- a/cmake/FindTrilinos.cmake
+++ b/cmake/FindTrilinos.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindViennaCL.cmake b/cmake/FindViennaCL.cmake
index aba2980..8f442c9 100644
--- a/cmake/FindViennaCL.cmake
+++ b/cmake/FindViennaCL.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindXLFortranLibs.cmake b/cmake/FindXLFortranLibs.cmake
index 37800c7..80f2923 100644
--- a/cmake/FindXLFortranLibs.cmake
+++ b/cmake/FindXLFortranLibs.cmake
@@ -1,4 +1,4 @@
-# © Copyright 1996-2016 ECMWF.
+# © Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/FindYACC.cmake b/cmake/FindYACC.cmake
index 7b15bfe..3eb3b5c 100644
--- a/cmake/FindYACC.cmake
+++ b/cmake/FindYACC.cmake
@@ -41,7 +41,7 @@
# This file is based on the FindFLEX CMake macro, and adapted by ECMWF
#=============================================================================
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/Findgrib_api.cmake b/cmake/Findgrib_api.cmake
index ab6fc0b..c6f6421 100644
--- a/cmake/Findgrib_api.cmake
+++ b/cmake/Findgrib_api.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/Findodb_api.cmake b/cmake/Findodb_api.cmake
index 0058fbe..00f4152 100644
--- a/cmake/Findodb_api.cmake
+++ b/cmake/Findodb_api.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/Findspot.cmake b/cmake/Findspot.cmake
index 52e0fb5..d932bfe 100644
--- a/cmake/Findspot.cmake
+++ b/cmake/Findspot.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/VERSION.cmake b/cmake/VERSION.cmake
index d9d8705..ce5f7de 100644
--- a/cmake/VERSION.cmake
+++ b/cmake/VERSION.cmake
@@ -1,7 +1,7 @@
set( ECBUILD_MAJOR_VERSION "2" )
-set( ECBUILD_MINOR_VERSION "5" )
+set( ECBUILD_MINOR_VERSION "6" )
set( ECBUILD_PATCH_VERSION "0" )
-set( ECBUILD_VERSION_STR "2.5.0" )
+set( ECBUILD_VERSION_STR "2.6.0" )
set( ECBUILD_MACRO_VERSION "${ECBUILD_MAJOR_VERSION}.${ECBUILD_MINOR_VERSION}" )
diff --git a/cmake/compiler_flags/Clang_C.cmake b/cmake/compiler_flags/Clang_C.cmake
index bc73c69..b742a5b 100644
--- a/cmake/compiler_flags/Clang_C.cmake
+++ b/cmake/compiler_flags/Clang_C.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/Clang_CXX.cmake b/cmake/compiler_flags/Clang_CXX.cmake
index 53f0f21..7570630 100644
--- a/cmake/compiler_flags/Clang_CXX.cmake
+++ b/cmake/compiler_flags/Clang_CXX.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/Cray_C.cmake b/cmake/compiler_flags/Cray_C.cmake
index f487cf4..f9b6e4b 100644
--- a/cmake/compiler_flags/Cray_C.cmake
+++ b/cmake/compiler_flags/Cray_C.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/Cray_CXX.cmake b/cmake/compiler_flags/Cray_CXX.cmake
index a2a6632..fdc4749 100644
--- a/cmake/compiler_flags/Cray_CXX.cmake
+++ b/cmake/compiler_flags/Cray_CXX.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/Cray_Fortran.cmake b/cmake/compiler_flags/Cray_Fortran.cmake
index 34b96e4..8575bba 100644
--- a/cmake/compiler_flags/Cray_Fortran.cmake
+++ b/cmake/compiler_flags/Cray_Fortran.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/GNU_C.cmake b/cmake/compiler_flags/GNU_C.cmake
index 955f527..288fc70 100644
--- a/cmake/compiler_flags/GNU_C.cmake
+++ b/cmake/compiler_flags/GNU_C.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/GNU_CXX.cmake b/cmake/compiler_flags/GNU_CXX.cmake
index 0ab8c3a..1a01e2d 100644
--- a/cmake/compiler_flags/GNU_CXX.cmake
+++ b/cmake/compiler_flags/GNU_CXX.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/GNU_Fortran.cmake b/cmake/compiler_flags/GNU_Fortran.cmake
index a12abec..6e28844 100644
--- a/cmake/compiler_flags/GNU_Fortran.cmake
+++ b/cmake/compiler_flags/GNU_Fortran.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/Intel_C.cmake b/cmake/compiler_flags/Intel_C.cmake
index dbea59f..5736004 100644
--- a/cmake/compiler_flags/Intel_C.cmake
+++ b/cmake/compiler_flags/Intel_C.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/Intel_CXX.cmake b/cmake/compiler_flags/Intel_CXX.cmake
index 5b8dc78..8e466e5 100644
--- a/cmake/compiler_flags/Intel_CXX.cmake
+++ b/cmake/compiler_flags/Intel_CXX.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/Intel_Fortran.cmake b/cmake/compiler_flags/Intel_Fortran.cmake
index 86b69dc..abd85f8 100644
--- a/cmake/compiler_flags/Intel_Fortran.cmake
+++ b/cmake/compiler_flags/Intel_Fortran.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/PGI_C.cmake b/cmake/compiler_flags/PGI_C.cmake
index 6784a14..1cc6485 100644
--- a/cmake/compiler_flags/PGI_C.cmake
+++ b/cmake/compiler_flags/PGI_C.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/PGI_CXX.cmake b/cmake/compiler_flags/PGI_CXX.cmake
index 877ef3f..6d31cf4 100644
--- a/cmake/compiler_flags/PGI_CXX.cmake
+++ b/cmake/compiler_flags/PGI_CXX.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/compiler_flags/PGI_Fortran.cmake b/cmake/compiler_flags/PGI_Fortran.cmake
index a268cc9..86c2a35 100644
--- a/cmake/compiler_flags/PGI_Fortran.cmake
+++ b/cmake/compiler_flags/PGI_Fortran.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_add_c_flags.cmake b/cmake/ecbuild_add_c_flags.cmake
index 098c254..138e4d8 100644
--- a/cmake/ecbuild_add_c_flags.cmake
+++ b/cmake/ecbuild_add_c_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_add_cxx11_flags.cmake b/cmake/ecbuild_add_cxx11_flags.cmake
index df8cde5..6c5c861 100644
--- a/cmake/ecbuild_add_cxx11_flags.cmake
+++ b/cmake/ecbuild_add_cxx11_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_add_cxx_flags.cmake b/cmake/ecbuild_add_cxx_flags.cmake
index 5104880..699c50a 100644
--- a/cmake/ecbuild_add_cxx_flags.cmake
+++ b/cmake/ecbuild_add_cxx_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_add_executable.cmake b/cmake/ecbuild_add_executable.cmake
index 424059e..5d78348 100644
--- a/cmake/ecbuild_add_executable.cmake
+++ b/cmake/ecbuild_add_executable.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -142,6 +142,28 @@ macro( ecbuild_add_executable )
if( _${_PAR_TARGET}_condition )
+ # insert already compiled objects (from OBJECT libraries)
+ unset( _all_objects )
+ foreach( _obj ${_PAR_OBJECTS} )
+ list( APPEND _all_objects $<TARGET_OBJECTS:${_obj}> )
+ endforeach()
+
+ list( APPEND _PAR_SOURCES ${_glob_srcs} )
+
+ if( ECBUILD_LIST_SOURCES )
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): sources ${_PAR_SOURCES}")
+ endif()
+
+ # glob sources
+ unset( _glob_srcs )
+ foreach( pattern ${_PAR_SOURCES_GLOB} )
+ ecbuild_list_add_pattern( LIST _glob_srcs GLOB "${pattern}" )
+ endforeach()
+
+ foreach( pattern ${_PAR_SOURCES_EXCLUDE_REGEX} )
+ ecbuild_list_exclude_pattern( LIST _glob_srcs REGEX "${pattern}" )
+ endforeach()
+
# add persistent layer files
if( DEFINED _PAR_PERSISTENT )
if( DEFINED PERSISTENT_NAMESPACE )
@@ -158,29 +180,26 @@ macro( ecbuild_add_executable )
add_custom_target( ${_PAR_TARGET}_templates SOURCES ${_PAR_TEMPLATES} )
endif()
- # glob sources
- unset( _glob_srcs )
- foreach( pattern ${_PAR_SOURCES_GLOB} )
- ecbuild_list_add_pattern( LIST _glob_srcs GLOB "${pattern}" )
- endforeach()
-
- foreach( pattern ${_PAR_SOURCES_EXCLUDE_REGEX} )
- ecbuild_list_exclude_pattern( LIST _glob_srcs REGEX "${pattern}" )
- endforeach()
-
- # insert already compiled objects (from OBJECT libraries)
- unset( _all_objects )
- foreach( _obj ${_PAR_OBJECTS} )
- list( APPEND _all_objects $<TARGET_OBJECTS:${_obj}> )
- endforeach()
-
- list( APPEND _PAR_SOURCES ${_glob_srcs} )
+ # Separate sources
+ if( _PAR_SOURCES )
+ ecbuild_separate_sources( TARGET ${_PAR_TARGET} SOURCES ${_PAR_SOURCES} )
+ endif()
- if( ECBUILD_LIST_SOURCES )
- ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): sources ${_PAR_SOURCES}")
+ if( ${_PAR_TARGET}_cuda_srcs )
+ if( NOT CUDA_FOUND )
+ ecbuild_error("ecbuild_add_executable(${_PAR_TARGET}): CUDA source files detected"
+ "but CUDA was not found.")
+ endif()
+ ecbuild_debug("ecbuild_add_executable(${_PAR_TARGET}): CUDA sources detected."
+ "Building executable with ecbuild_add_executable() rather than intrinsic"
+ "add_executable().")
endif()
- add_executable( ${_PAR_TARGET} ${_PAR_SOURCES} ${_all_objects} )
+ if( NOT ${_PAR_TARGET}_cuda_srcs )
+ add_executable( ${_PAR_TARGET} ${_PAR_SOURCES} ${_all_objects} )
+ else()
+ cuda_add_executable( ${_PAR_TARGET} ${_PAR_SOURCES} ${_all_objects} )
+ endif()
# ecbuild_echo_target( ${_PAR_TARGET} )
@@ -225,15 +244,6 @@ macro( ecbuild_add_executable )
endforeach()
endif()
- # filter sources
-
- ecbuild_separate_sources( TARGET ${_PAR_TARGET} SOURCES ${_PAR_SOURCES} )
-
- # ecbuild_debug_var( ${_PAR_TARGET}_h_srcs )
- # ecbuild_debug_var( ${_PAR_TARGET}_c_srcs )
- # ecbuild_debug_var( ${_PAR_TARGET}_cxx_srcs )
- # ecbuild_debug_var( ${_PAR_TARGET}_fortran_srcs )
-
# Override compilation flags on a per source file basis
ecbuild_target_flags( ${_PAR_TARGET} "${_PAR_CFLAGS}" "${_PAR_CXXFLAGS}" "${_PAR_FFLAGS}" )
diff --git a/cmake/ecbuild_add_extra_search_paths.cmake b/cmake/ecbuild_add_extra_search_paths.cmake
index 94ac85b..690cde6 100644
--- a/cmake/ecbuild_add_extra_search_paths.cmake
+++ b/cmake/ecbuild_add_extra_search_paths.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_add_fortran_flags.cmake b/cmake/ecbuild_add_fortran_flags.cmake
index 0d3b544..2ac89e8 100644
--- a/cmake/ecbuild_add_fortran_flags.cmake
+++ b/cmake/ecbuild_add_fortran_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_add_library.cmake b/cmake/ecbuild_add_library.cmake
index a7f8001..ee29008 100644
--- a/cmake/ecbuild_add_library.cmake
+++ b/cmake/ecbuild_add_library.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -200,6 +200,26 @@ function( ecbuild_add_library_impl )
ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): library type is ${_PAR_TYPE}")
endif()
+ # insert already compiled objects (from OBJECT libraries)
+ unset( _all_objects )
+ foreach( _obj ${_PAR_OBJECTS} )
+ list( APPEND _all_objects $<TARGET_OBJECTS:${_obj}> )
+ endforeach()
+
+ # glob sources
+ unset( _glob_srcs )
+ foreach( pattern ${_PAR_SOURCES_GLOB} )
+ ecbuild_list_add_pattern( LIST _glob_srcs GLOB "${pattern}" )
+ endforeach()
+
+ foreach( pattern ${_PAR_SOURCES_EXCLUDE_REGEX} )
+ ecbuild_list_exclude_pattern( LIST _glob_srcs REGEX "${pattern}" )
+ endforeach()
+ list( APPEND _PAR_SOURCES ${_glob_srcs} )
+
+ if( ECBUILD_LIST_SOURCES )
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): sources ${_PAR_SOURCES}")
+ endif()
# add persistent layer files
if( DEFINED _PAR_PERSISTENT )
@@ -217,30 +237,30 @@ function( ecbuild_add_library_impl )
add_custom_target( ${_PAR_TARGET}_templates SOURCES ${_PAR_TEMPLATES} )
endif()
- # glob sources
- unset( _glob_srcs )
- foreach( pattern ${_PAR_SOURCES_GLOB} )
- ecbuild_list_add_pattern( LIST _glob_srcs GLOB "${pattern}" )
- endforeach()
-
- foreach( pattern ${_PAR_SOURCES_EXCLUDE_REGEX} )
- ecbuild_list_exclude_pattern( LIST _glob_srcs REGEX "${pattern}" )
- endforeach()
-
- # insert already compiled objects (from OBJECT libraries)
- unset( _all_objects )
- foreach( _obj ${_PAR_OBJECTS} )
- list( APPEND _all_objects $<TARGET_OBJECTS:${_obj}> )
- endforeach()
-
- list( APPEND _PAR_SOURCES ${_glob_srcs} )
-
- if( ECBUILD_LIST_SOURCES )
- ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): sources ${_PAR_SOURCES}")
+ # Separate sources
+ if( _PAR_SOURCES )
+ ecbuild_separate_sources( TARGET ${_PAR_TARGET} SOURCES ${_PAR_SOURCES} )
endif()
- add_library( ${_PAR_TARGET} ${_PAR_TYPE} ${_PAR_SOURCES} ${_all_objects} )
+ if( ${_PAR_TARGET}_cuda_srcs )
+ if( NOT CUDA_FOUND )
+ ecbuild_error("ecbuild_add_library(${_PAR_TARGET}): CUDA source files detected"
+ "but CUDA was not found.")
+ endif()
+ if( _PAR_TYPE MATCHES "OBJECT" )
+ ecbuild_error("ecbuild_add_library(${_PAR_TARGET}): CUDA source files detected"
+ "but CMake OBJECT libraries with CUDA are not supported.")
+ endif()
+ ecbuild_debug("ecbuild_add_library(${_PAR_TARGET}): CUDA sources detected."
+ "Building library with cuda_add_library() rather than intrinsic"
+ "add_library().")
+ endif()
+ if( NOT ${_PAR_TARGET}_cuda_srcs )
+ add_library( ${_PAR_TARGET} ${_PAR_TYPE} ${_PAR_SOURCES} ${_all_objects} )
+ else()
+ cuda_add_library( ${_PAR_TARGET} ${_PAR_TYPE} ${_PAR_SOURCES} ${_all_objects} )
+ endif()
# ecbuild_echo_target( ${_PAR_TARGET} )
# set OUTPUT_NAME
@@ -363,17 +383,6 @@ function( ecbuild_add_library_impl )
endif()
endif()
- # filter sources
-
- if( _PAR_SOURCES )
- ecbuild_separate_sources( TARGET ${_PAR_TARGET} SOURCES ${_PAR_SOURCES} )
- endif()
-
- # ecbuild_debug_var( ${_PAR_TARGET}_h_srcs )
- # ecbuild_debug_var( ${_PAR_TARGET}_c_srcs )
- # ecbuild_debug_var( ${_PAR_TARGET}_cxx_srcs )
- # ecbuild_debug_var( ${_PAR_TARGET}_fortran_srcs )
-
# Override compilation flags on a per source file basis
ecbuild_target_flags( ${_PAR_TARGET} "${_PAR_CFLAGS}" "${_PAR_CXXFLAGS}" "${_PAR_FFLAGS}" )
@@ -536,7 +545,10 @@ macro( ecbuild_add_library )
ecbuild_add_library_impl( TARGET ${_p_TARGET} TYPE SHARED ${_p_UNPARSED_ARGUMENTS} )
ecbuild_add_library_impl( TARGET ${_p_TARGET}-static TYPE STATIC ${_p_UNPARSED_ARGUMENTS} DEPENDS ${_p_TARGET} )
- set_target_properties( ${_p_TARGET}-static PROPERTIES OUTPUT_NAME ${_p_TARGET} )
+ # If the library is built conditionally the target might not exist
+ if ( TARGET ${_p_TARGET}-static )
+ set_target_properties( ${_p_TARGET}-static PROPERTIES OUTPUT_NAME ${_p_TARGET} )
+ endif()
else()
diff --git a/cmake/ecbuild_add_option.cmake b/cmake/ecbuild_add_option.cmake
index fd8076e..6d5363f 100644
--- a/cmake/ecbuild_add_option.cmake
+++ b/cmake/ecbuild_add_option.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -17,7 +17,6 @@
# ecbuild_add_option( FEATURE <name>
# [ DEFAULT ON|OFF ]
# [ DESCRIPTION <description> ]
-# [ PURPOSE <purpose> ]
# [ REQUIRED_PACKAGES <package1> [<package2> ...] ]
# [ CONDITION <condition> ]
# [ ADVANCED ] [ NO_TPL ] )
@@ -34,12 +33,6 @@
# DESCRIPTION : optional
# string describing the feature (shown in summary and stored in the cache)
#
-# TYPE : optional, one of RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED
-# type of dependency of the project on this package (defaults to OPTIONAL)
-#
-# PURPOSE : optional
-# string describing which functionality this package enables in the project
-#
# REQUIRED_PACKAGES : optional
# list of packages required to be found for this feature to be enabled
#
@@ -59,6 +52,22 @@
# The entire specification must be enclosed in quotes and is passed on
# verbatim. Any options of ``ecbuild_use_package`` are supported.
#
+# .. note::
+#
+# Arguments inside the package string that require quoting need to use the
+# `bracket argument syntax`_ introduced in CMake 3.0 since
+# regular quotes even when escaped are swallowed by the CMake parser.
+#
+# Alternatively, the name of a CMake variable containing the string can be
+# passed, which will be expanded by ``ecbuild_find_package``: ::
+#
+# set( ECCODES_FAIL_MSG
+# "grib_api can be used instead (select with -DENABLE_ECCODES=OFF)" )
+# ecbuild_add_option( FEATURE ECCODES
+# DESCRIPTION "Use eccodes instead of grib_api"
+# REQUIRED_PACKAGES "PROJECT eccodes REQUIRED FAILURE_MSG ECCODES_FAIL_MSG"
+# DEFAULT ON )
+#
# CONDITION : optional
# conditional expression which must evaluate to true for this option to be
# enabled (must be valid in a CMake ``if`` statement)
@@ -83,6 +92,8 @@
# With an already populated cache, use ``-DENABLE_<FEATURE>=REQUIRE`` to make
# the feature a required feature (this cannot be done via the CMake GUI).
#
+# .. _bracket argument syntax: https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#bracket-argument
+#
##############################################################################
macro( ecbuild_add_option )
@@ -114,8 +125,11 @@ macro( ecbuild_add_option )
endif()
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): defaults to ${_p_DEFAULT}")
- if( NOT _p_TYPE )
- set( _p_TYPE OPTIONAL )
+ if( _p_PURPOSE )
+ ecbuild_deprecate( "ecbuild_add_option: argument PURPOSE is ignored and will be removed in a future release." )
+ endif()
+ if( _p_TYPE )
+ ecbuild_deprecate( "ecbuild_add_option: argument TYPE is ignored and will be removed in a future release." )
endif()
# check CONDITION parameter
@@ -154,13 +168,14 @@ macro( ecbuild_add_option )
# define the option -- for cmake GUI
option( ENABLE_${_p_FEATURE} "${_p_DESCRIPTION}" ${_p_DEFAULT} )
- ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): defining option ENABLE_${_p_FEATURE} '${_p_DESCRIPTION}' ${_p_DEFAULT}")
- ecbuild_set_feature( ${_p_FEATURE} ENABLED ${_p_DEFAULT} )
- set_package_properties( ${_p_FEATURE} PROPERTIES
- DESCRIPTION "${_p_DESCRIPTION}"
- TYPE ${_p_TYPE}
- PURPOSE "${_p_PURPOSE}" )
+ get_property( _feature_desc GLOBAL PROPERTY _CMAKE_${_p_FEATURE}_DESCRIPTION )
+ if( _feature_desc )
+ add_feature_info( ${_p_FEATURE} ENABLE_${_p_FEATURE} "${_feature_desc}, ${PROJECT_NAME}: ${_p_DESCRIPTION}" )
+ else()
+ add_feature_info( ${_p_FEATURE} ENABLE_${_p_FEATURE} "${PROJECT_NAME}: ${_p_DESCRIPTION}" )
+ endif()
+ ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): defining option ENABLE_${_p_FEATURE} '${_p_DESCRIPTION}' ${_p_DEFAULT}")
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): ENABLE_${_p_FEATURE}=${ENABLE_${_p_FEATURE}}")
if( ENABLE_${_p_FEATURE} )
@@ -183,6 +198,12 @@ macro( ecbuild_add_option )
if( pkgname STREQUAL "PROJECT" ) # if 1st entry is PROJECT, then we are looking for a ecbuild project
set( pkgproject 1 )
list( GET pkglist 1 pkgname )
+ # Use feature description as package description if there is none
+ list( FIND pkglist DESCRIPTION __description )
+ if( __description LESS 0 )
+ ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): no description for ${pkgname}, using feature description '${_p_DESCRIPTION}'")
+ list( APPEND pkglist DESCRIPTION "${_p_DESCRIPTION}" )
+ endif()
else() # else 1st entry is package name
set( pkgproject 0 )
endif()
@@ -209,7 +230,14 @@ macro( ecbuild_add_option )
else()
- if( pkgname STREQUAL "MPI" )
+ if( pkgname STREQUAL "LAPACK" )
+ ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): searching for LAPACK - ecbuild_find_package( NAME ${pkglist} )")
+ ecbuild_find_package( NAME ${pkglist} )
+ if( HAVE_LAPACK AND TARGET lapack )
+ ecbuild_debug( "LAPACK found as CMake target lapack" )
+ set( LAPACK_LIBRARIES lapack )
+ endif()
+ elseif( pkgname STREQUAL "MPI" )
set( _find_args ${pkglist} )
list( REMOVE_ITEM _find_args "MPI" )
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): searching for MPI - ecbuild_find_mpi( ${_find_args} )")
@@ -270,15 +298,18 @@ macro( ecbuild_add_option )
set( HAVE_${_p_FEATURE} 0 )
endif( _${_p_FEATURE}_condition )
- ecbuild_set_feature( ${_p_FEATURE} ENABLED ${HAVE_${_p_FEATURE}} )
# FINAL CHECK
if( HAVE_${_p_FEATURE} )
+ ecbuild_enable_feature( ${_p_FEATURE} )
+
ecbuild_info( "Feature ${_p_FEATURE} enabled" )
else() # if user provided input and we cannot satisfy FAIL otherwise WARN
+ ecbuild_disable_feature( ${_p_FEATURE} )
+
if( ${_p_FEATURE}_user_provided_input )
if( NOT _${_p_FEATURE}_condition )
string(REPLACE ";" " " _condition_msg "${_p_CONDITION}")
@@ -294,7 +325,7 @@ macro( ecbuild_add_option )
ecbuild_info( "Feature ${_p_FEATURE} was not enabled (also not requested) -- following required packages weren't found: ${_failed_to_find_packages}" )
endif()
set( ENABLE_${_p_FEATURE} OFF )
- ecbuild_set_feature( ${_p_FEATURE} ENABLED OFF )
+ ecbuild_disable_feature( ${_p_FEATURE} )
endif()
endif()
@@ -303,7 +334,7 @@ macro( ecbuild_add_option )
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): feature disabled")
set( HAVE_${_p_FEATURE} 0 )
- ecbuild_set_feature( ${_p_FEATURE} ENABLED OFF )
+ ecbuild_disable_feature( ${_p_FEATURE} )
endif()
diff --git a/cmake/ecbuild_add_persistent.cmake b/cmake/ecbuild_add_persistent.cmake
index 42bb44b..e5a875b 100644
--- a/cmake/ecbuild_add_persistent.cmake
+++ b/cmake/ecbuild_add_persistent.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_add_resources.cmake b/cmake/ecbuild_add_resources.cmake
index cf0543b..2dfaa5e 100644
--- a/cmake/ecbuild_add_resources.cmake
+++ b/cmake/ecbuild_add_resources.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_add_test.cmake b/cmake/ecbuild_add_test.cmake
index 1dcf2c6..1da8568 100644
--- a/cmake/ecbuild_add_test.cmake
+++ b/cmake/ecbuild_add_test.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_append_to_rpath.cmake b/cmake/ecbuild_append_to_rpath.cmake
index 9ecde3e..895f837 100644
--- a/cmake/ecbuild_append_to_rpath.cmake
+++ b/cmake/ecbuild_append_to_rpath.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_bundle.cmake b/cmake/ecbuild_bundle.cmake
index aee900c..6a49354 100644
--- a/cmake/ecbuild_bundle.cmake
+++ b/cmake/ecbuild_bundle.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -165,13 +165,30 @@ endmacro()
#
# ecbuild_bundle_finalize()
#
+# Options
+# -------
+#
+# See documentation for ecbuild_install_project() since all arguments are
+# forwarded to an internal call to that macro.
+#
+# If no arguments are passed, then the default installation NAME is set to
+# the default project name ${CMAKE_PROJECT_NAME}
+#
##############################################################################
macro( ecbuild_bundle_finalize )
add_custom_target( update DEPENDS ${git_update_targets} )
- ecbuild_install_project( NAME ${CMAKE_PROJECT_NAME} )
+ ecbuild_info("---------------------------------------------------------")
+ ecbuild_info("Bundle ${CMAKE_PROJECT_NAME}")
+ ecbuild_info("---------------------------------------------------------")
+
+ if("${ARGV1}")
+ ecbuild_install_project( ${ARGV} )
+ else()
+ ecbuild_install_project( NAME ${CMAKE_PROJECT_NAME} )
+ endif()
ecbuild_print_summary()
diff --git a/cmake/ecbuild_cache.cmake b/cmake/ecbuild_cache.cmake
index e257b36..d45b31a 100644
--- a/cmake/ecbuild_cache.cmake
+++ b/cmake/ecbuild_cache.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_check_c_source_return.cmake b/cmake/ecbuild_check_c_source_return.cmake
index 18b6117..38d89f7 100644
--- a/cmake/ecbuild_check_c_source_return.cmake
+++ b/cmake/ecbuild_check_c_source_return.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_check_compiler.cmake b/cmake/ecbuild_check_compiler.cmake
index 437b81e..197f0b5 100644
--- a/cmake/ecbuild_check_compiler.cmake
+++ b/cmake/ecbuild_check_compiler.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_check_cxx11.cmake b/cmake/ecbuild_check_cxx11.cmake
index 9552389..d2f9629 100644
--- a/cmake/ecbuild_check_cxx11.cmake
+++ b/cmake/ecbuild_check_cxx11.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_check_cxx_source_return.cmake b/cmake/ecbuild_check_cxx_source_return.cmake
index 0868b22..7270540 100644
--- a/cmake/ecbuild_check_cxx_source_return.cmake
+++ b/cmake/ecbuild_check_cxx_source_return.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_check_fortran.cmake b/cmake/ecbuild_check_fortran.cmake
index 5612134..d7a63cf 100644
--- a/cmake/ecbuild_check_fortran.cmake
+++ b/cmake/ecbuild_check_fortran.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_check_fortran_source_return.cmake b/cmake/ecbuild_check_fortran_source_return.cmake
index 175f4ef..92168b9 100644
--- a/cmake/ecbuild_check_fortran_source_return.cmake
+++ b/cmake/ecbuild_check_fortran_source_return.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_check_functions.cmake b/cmake/ecbuild_check_functions.cmake
index 73f5cb5..4307429 100644
--- a/cmake/ecbuild_check_functions.cmake
+++ b/cmake/ecbuild_check_functions.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_check_os.cmake b/cmake/ecbuild_check_os.cmake
index 8d325dc..be92c87 100644
--- a/cmake/ecbuild_check_os.cmake
+++ b/cmake/ecbuild_check_os.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -42,35 +42,32 @@ endif()
if( ENABLE_OS_TYPES_TEST )
- set( EC_SIZEOF_PTR ${CMAKE_SIZEOF_VOID_P} )
- ecbuild_cache_var( EC_SIZEOF_PTR )
- ecbuild_cache_check_type_size( char EC_SIZEOF_CHAR )
- ecbuild_cache_check_type_size( short EC_SIZEOF_SHORT )
- ecbuild_cache_check_type_size( int EC_SIZEOF_INT )
- ecbuild_cache_check_type_size( long EC_SIZEOF_LONG )
- ecbuild_cache_check_type_size( "long long" EC_SIZEOF_LONG_LONG )
- ecbuild_cache_check_type_size( float EC_SIZEOF_FLOAT )
- ecbuild_cache_check_type_size( double EC_SIZEOF_DOUBLE )
- ecbuild_cache_check_type_size( "long double" EC_SIZEOF_LONG_DOUBLE )
- ecbuild_cache_check_type_size( size_t EC_SIZEOF_SIZE_T )
- ecbuild_cache_check_type_size( ssize_t EC_SIZEOF_SSIZE_T )
- ecbuild_cache_check_type_size( off_t EC_SIZEOF_OFF_T )
-
-# ecbuild_info( "sizeof void* [${EC_SIZEOF_PTR}]" )
-# ecbuild_info( "sizeof off_t [${EC_SIZEOF_OFF_T}]" )
-# ecbuild_info( "sizeof int [${EC_SIZEOF_INT}]" )
-# ecbuild_info( "sizeof short [${EC_SIZEOF_SHORT}]" )
-# ecbuild_info( "sizeof long [${EC_SIZEOF_LONG}]" )
-# ecbuild_info( "sizeof size_t [${EC_SIZEOF_SIZE_T}]" )
-# ecbuild_info( "sizeof float [${EC_SIZEOF_FLOAT}]" )
-# ecbuild_info( "sizeof double [${EC_SIZEOF_DOUBLE}]" )
-# ecbuild_info( "sizeof long long [${EC_SIZEOF_LONG_LONG}]" )
-# ecbuild_info( "sizeof long double [${EC_SIZEOF_LONG_DOUBLE}]" )
-
-# ecbuild_info( "system sizeof :" )
-# ecbuild_info( " void* [${EC_SIZEOF_PTR}] size_t [${EC_SIZEOF_SIZE_T}] off_t [${EC_SIZEOF_OFF_T}] short [${EC_SIZEOF_SHORT}]" )
-# ecbuild_info( " int [${EC_SIZEOF_INT}] long [${EC_SIZEOF_LONG}] long long [${EC_SIZEOF_LONG_LONG}]" )
-# ecbuild_info( " float [${EC_SIZEOF_FLOAT}] double [${EC_SIZEOF_DOUBLE}] long double [${EC_SIZEOF_LONG_DOUBLE}]" )
+ set( EC_SIZEOF_PTR ${CMAKE_SIZEOF_VOID_P} )
+ ecbuild_cache_var( EC_SIZEOF_PTR )
+ ecbuild_cache_check_type_size( char EC_SIZEOF_CHAR )
+ ecbuild_cache_check_type_size( short EC_SIZEOF_SHORT )
+ ecbuild_cache_check_type_size( int EC_SIZEOF_INT )
+ ecbuild_cache_check_type_size( long EC_SIZEOF_LONG )
+ ecbuild_cache_check_type_size( "long long" EC_SIZEOF_LONG_LONG )
+ ecbuild_cache_check_type_size( float EC_SIZEOF_FLOAT )
+ ecbuild_cache_check_type_size( double EC_SIZEOF_DOUBLE )
+ ecbuild_cache_check_type_size( "long double" EC_SIZEOF_LONG_DOUBLE )
+ ecbuild_cache_check_type_size( size_t EC_SIZEOF_SIZE_T )
+ ecbuild_cache_check_type_size( ssize_t EC_SIZEOF_SSIZE_T )
+ ecbuild_cache_check_type_size( off_t EC_SIZEOF_OFF_T )
+
+ ecbuild_debug( "sizeof void* [${EC_SIZEOF_PTR}]" )
+ ecbuild_debug( "sizeof char [${EC_SIZEOF_CHAR}]" )
+ ecbuild_debug( "sizeof short [${EC_SIZEOF_SHORT}]" )
+ ecbuild_debug( "sizeof int [${EC_SIZEOF_INT}]" )
+ ecbuild_debug( "sizeof long [${EC_SIZEOF_LONG}]" )
+ ecbuild_debug( "sizeof long long [${EC_SIZEOF_LONG_LONG}]" )
+ ecbuild_debug( "sizeof float [${EC_SIZEOF_FLOAT}]" )
+ ecbuild_debug( "sizeof double [${EC_SIZEOF_DOUBLE}]" )
+ ecbuild_debug( "sizeof long double [${EC_SIZEOF_LONG_DOUBLE}]" )
+ ecbuild_debug( "sizeof size_t [${EC_SIZEOF_SIZE_T}]" )
+ ecbuild_debug( "sizeof ssize_t [${EC_SIZEOF_SSIZE_T}]" )
+ ecbuild_debug( "sizeof off_t [${EC_SIZEOF_OFF_T}]" )
endif()
@@ -84,25 +81,25 @@ if( ENABLE_LARGE_FILE_SUPPORT )
ecbuild_cache_check_type_size( off_t EC_SIZEOF_OFF_T )
- if( EC_SIZEOF_OFF_T LESS "8" )
+ if( EC_SIZEOF_OFF_T LESS "8" )
- if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
- add_definitions( -D_FILE_OFFSET_BITS=64 )
- endif()
+ if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
+ add_definitions( -D_FILE_OFFSET_BITS=64 )
+ endif()
- if( ${CMAKE_SYSTEM_NAME} MATCHES "AIX" )
- add_definitions( -D_LARGE_FILES=64 )
- endif()
+ if( ${CMAKE_SYSTEM_NAME} MATCHES "AIX" )
+ add_definitions( -D_LARGE_FILES=64 )
+ endif()
- get_directory_property( __compile_defs COMPILE_DEFINITIONS )
+ get_directory_property( __compile_defs COMPILE_DEFINITIONS )
- if( __compile_defs )
- foreach( def ${__compile_defs} )
- list( APPEND CMAKE_REQUIRED_DEFINITIONS -D${def} )
- endforeach()
- endif()
+ if( __compile_defs )
+ foreach( def ${__compile_defs} )
+ list( APPEND CMAKE_REQUIRED_DEFINITIONS -D${def} )
+ endforeach()
+ endif()
- endif()
+ endif()
endif()
@@ -113,15 +110,15 @@ if( ENABLE_OS_ENDINESS_TEST )
if( NOT DEFINED EC_BIG_ENDIAN AND NOT DEFINED EC_LITTLE_ENDIAN )
- test_big_endian( _BIG_ENDIAN )
+ test_big_endian( _BIG_ENDIAN )
- if( _BIG_ENDIAN )
+ if( _BIG_ENDIAN )
set( EC_BIG_ENDIAN 1 )
set( EC_LITTLE_ENDIAN 0 )
- else()
+ else()
set( EC_BIG_ENDIAN 0 )
set( EC_LITTLE_ENDIAN 1 )
- endif()
+ endif()
endif()
@@ -129,35 +126,35 @@ if( ENABLE_OS_ENDINESS_TEST )
ecbuild_cache_var( EC_LITTLE_ENDIAN )
if( NOT DEFINED IEEE_BE )
- check_c_source_runs(
- "int compare(unsigned char* a,unsigned char* b) {
- while(*a != 0) if (*(b++)!=*(a++)) return 1;
- return 0;
- }
- int main(int argc,char** argv) {
- unsigned char dc[]={0x30,0x61,0xDE,0x80,0x93,0x67,0xCC,0xD9,0};
- double da=1.23456789e-75;
- unsigned char* ca;
+ check_c_source_runs(
+ "int compare(unsigned char* a,unsigned char* b) {
+ while(*a != 0) if (*(b++)!=*(a++)) return 1;
+ return 0;
+ }
+ int main(int argc,char** argv) {
+ unsigned char dc[]={0x30,0x61,0xDE,0x80,0x93,0x67,0xCC,0xD9,0};
+ double da=1.23456789e-75;
+ unsigned char* ca;
- unsigned char fc[]={0x05,0x83,0x48,0x22,0};
- float fa=1.23456789e-35;
+ unsigned char fc[]={0x05,0x83,0x48,0x22,0};
+ float fa=1.23456789e-35;
- if (sizeof(double)!=8) return 1;
+ if (sizeof(double)!=8) return 1;
- ca=(unsigned char*)&da;
- if (compare(dc,ca)) return 1;
+ ca=(unsigned char*)&da;
+ if (compare(dc,ca)) return 1;
- if (sizeof(float)!=4) return 1;
+ if (sizeof(float)!=4) return 1;
- ca=(unsigned char*)&fa;
- if (compare(fc,ca)) return 1;
+ ca=(unsigned char*)&fa;
+ if (compare(fc,ca)) return 1;
- return 0;
- }" IEEE_BE )
+ return 0;
+ }" IEEE_BE )
- if( "${IEEE_BE}" STREQUAL "" )
- set( IEEE_BE 0 CACHE INTERNAL "Test IEEE_BE")
- endif()
+ if( "${IEEE_BE}" STREQUAL "" )
+ set( IEEE_BE 0 CACHE INTERNAL "Test IEEE_BE")
+ endif()
endif()
@@ -167,36 +164,36 @@ if( ENABLE_OS_ENDINESS_TEST )
ecbuild_critical("Failed to sanity check on endiness: OS should be Big-Endian but compiled code runs differently -- to ignore this pass -DIEEE_BE=0 to CMake/ecBuild")
endif()
- if( NOT DEFINED IEEE_LE )
- check_c_source_runs(
- "int compare(unsigned char* a,unsigned char* b) {
- while(*a != 0) if (*(b++)!=*(a++)) return 1;
- return 0;
- }
- int main(int argc,char** argv) {
- unsigned char dc[]={0xD9,0xCC,0x67,0x93,0x80,0xDE,0x61,0x30,0};
- double da=1.23456789e-75;
- unsigned char* ca;
+ if( NOT DEFINED IEEE_LE )
+ check_c_source_runs(
+ "int compare(unsigned char* a,unsigned char* b) {
+ while(*a != 0) if (*(b++)!=*(a++)) return 1;
+ return 0;
+ }
+ int main(int argc,char** argv) {
+ unsigned char dc[]={0xD9,0xCC,0x67,0x93,0x80,0xDE,0x61,0x30,0};
+ double da=1.23456789e-75;
+ unsigned char* ca;
- unsigned char fc[]={0x22,0x48,0x83,0x05,0};
- float fa=1.23456789e-35;
+ unsigned char fc[]={0x22,0x48,0x83,0x05,0};
+ float fa=1.23456789e-35;
- if (sizeof(double)!=8) return 1;
+ if (sizeof(double)!=8) return 1;
- ca=(unsigned char*)&da;
- if (compare(dc,ca)) return 1;
+ ca=(unsigned char*)&da;
+ if (compare(dc,ca)) return 1;
- if (sizeof(float)!=4) return 1;
+ if (sizeof(float)!=4) return 1;
- ca=(unsigned char*)&fa;
- if (compare(fc,ca)) return 1;
+ ca=(unsigned char*)&fa;
+ if (compare(fc,ca)) return 1;
- return 0;
- }" IEEE_LE )
+ return 0;
+ }" IEEE_LE )
- if( "${IEEE_LE}" STREQUAL "" )
- set( IEEE_LE 0 CACHE INTERNAL "Test IEEE_LE")
- endif()
+ if( "${IEEE_LE}" STREQUAL "" )
+ set( IEEE_LE 0 CACHE INTERNAL "Test IEEE_LE")
+ endif()
endif()
ecbuild_cache_var( IEEE_LE )
@@ -281,102 +278,102 @@ if( UNIX )
endif()
- ### Solaris ###
+ ### Solaris ###
- if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
- set( EC_OS_NAME "solaris" )
- endif()
+ if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
+ set( EC_OS_NAME "solaris" )
+ endif()
- ### AIX ###
+ ### AIX ###
- if( ${CMAKE_SYSTEM_NAME} MATCHES "AIX" )
+ if( ${CMAKE_SYSTEM_NAME} MATCHES "AIX" )
- set( EC_OS_NAME "aix" )
+ set( EC_OS_NAME "aix" )
- set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -bbigtoc" )
+ set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -bbigtoc" )
- if( CMAKE_C_COMPILER_ID MATCHES "GNU" )
- set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker" )
- endif()
+ if( CMAKE_C_COMPILER_ID MATCHES "GNU" )
+ set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker" )
+ endif()
- if( CMAKE_COMPILER_IS_GNUCC )
- if( EC_OS_BITS EQUAL "64" )
- ecbuild_add_c_flags("-maix64")
- endif()
- if( EC_OS_BITS EQUAL "32" )
- ecbuild_add_c_flags("-maix32")
- endif()
- endif()
+ if( CMAKE_COMPILER_IS_GNUCC )
+ if( EC_OS_BITS EQUAL "64" )
+ ecbuild_add_c_flags("-maix64")
+ endif()
+ if( EC_OS_BITS EQUAL "32" )
+ ecbuild_add_c_flags("-maix32")
+ endif()
+ endif()
- if( CMAKE_COMPILER_IS_GNUCXX )
- if( EC_OS_BITS EQUAL "64" )
- ecbuild_add_cxx_flags("-maix64")
- endif()
- if( EC_OS_BITS EQUAL "32" )
- ecbuild_add_cxx_flags("-maix32")
- endif()
- endif()
+ if( CMAKE_COMPILER_IS_GNUCXX )
+ if( EC_OS_BITS EQUAL "64" )
+ ecbuild_add_cxx_flags("-maix64")
+ endif()
+ if( EC_OS_BITS EQUAL "32" )
+ ecbuild_add_cxx_flags("-maix32")
+ endif()
+ endif()
- if( CMAKE_C_COMPILER_ID MATCHES "XL" )
+ if( CMAKE_C_COMPILER_ID MATCHES "XL" )
- ecbuild_add_c_flags("-qpic=large")
+ ecbuild_add_c_flags("-qpic=large")
# ecbuild_add_c_flags("-qweaksymbol")
- if(EC_OS_BITS EQUAL "32" )
- ecbuild_add_c_flags("-q32")
- endif()
+ if(EC_OS_BITS EQUAL "32" )
+ ecbuild_add_c_flags("-q32")
+ endif()
- if(${CMAKE_BUILD_TYPE} MATCHES "Release" OR ${CMAKE_BUILD_TYPE} MATCHES "Production" )
- ecbuild_add_c_flags("-qstrict")
- ecbuild_add_c_flags("-qinline")
- endif()
+ if(${CMAKE_BUILD_TYPE} MATCHES "Release" OR ${CMAKE_BUILD_TYPE} MATCHES "Production" )
+ ecbuild_add_c_flags("-qstrict")
+ ecbuild_add_c_flags("-qinline")
+ endif()
- if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
- ecbuild_add_c_flags("-qfullpath")
- ecbuild_add_c_flags("-qkeepparm")
- endif()
+ if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ ecbuild_add_c_flags("-qfullpath")
+ ecbuild_add_c_flags("-qkeepparm")
+ endif()
- endif()
+ endif()
- if( CMAKE_CXX_COMPILER_ID MATCHES "XL" )
+ if( CMAKE_CXX_COMPILER_ID MATCHES "XL" )
- ecbuild_add_cxx_flags("-qpic=large")
- ecbuild_add_cxx_flags("-bmaxdata:0x40000000")
- ecbuild_add_cxx_flags("-qrtti")
- ecbuild_add_cxx_flags("-qfuncsect")
+ ecbuild_add_cxx_flags("-qpic=large")
+ ecbuild_add_cxx_flags("-bmaxdata:0x40000000")
+ ecbuild_add_cxx_flags("-qrtti")
+ ecbuild_add_cxx_flags("-qfuncsect")
# ecbuild_add_cxx_flags("-qweaksymbol")
- if(EC_OS_BITS EQUAL "32" )
- ecbuild_add_cxx_flags("-q32")
- endif()
+ if(EC_OS_BITS EQUAL "32" )
+ ecbuild_add_cxx_flags("-q32")
+ endif()
- if(${CMAKE_BUILD_TYPE} MATCHES "Release" OR ${CMAKE_BUILD_TYPE} MATCHES "Production" )
- ecbuild_add_cxx_flags("-qstrict")
- ecbuild_add_cxx_flags("-qinline")
- endif()
+ if(${CMAKE_BUILD_TYPE} MATCHES "Release" OR ${CMAKE_BUILD_TYPE} MATCHES "Production" )
+ ecbuild_add_cxx_flags("-qstrict")
+ ecbuild_add_cxx_flags("-qinline")
+ endif()
- if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
- ecbuild_add_cxx_flags("-qfullpath")
- ecbuild_add_cxx_flags("-qkeepparm")
- endif()
+ if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ ecbuild_add_cxx_flags("-qfullpath")
+ ecbuild_add_cxx_flags("-qkeepparm")
+ endif()
- endif()
+ endif()
- if( CMAKE_Fortran_COMPILER_ID MATCHES "XL" )
+ if( CMAKE_Fortran_COMPILER_ID MATCHES "XL" )
- ecbuild_add_fortran_flags("-qxflag=dealloc_cfptr")
- ecbuild_add_fortran_flags("-qextname")
- ecbuild_add_fortran_flags("-qdpc=e")
- ecbuild_add_fortran_flags("-bmaxdata:0x40000000")
- ecbuild_add_fortran_flags("-bloadmap:loadmap -bmap:loadmap")
+ ecbuild_add_fortran_flags("-qxflag=dealloc_cfptr")
+ ecbuild_add_fortran_flags("-qextname")
+ ecbuild_add_fortran_flags("-qdpc=e")
+ ecbuild_add_fortran_flags("-bmaxdata:0x40000000")
+ ecbuild_add_fortran_flags("-bloadmap:loadmap -bmap:loadmap")
- if(EC_OS_BITS EQUAL "32" )
- ecbuild_add_fortran_flags("-q32")
- endif()
- endif()
+ if(EC_OS_BITS EQUAL "32" )
+ ecbuild_add_fortran_flags("-q32")
+ endif()
+ endif()
- endif()
+ endif()
endif()
@@ -384,8 +381,8 @@ endif()
if( ${CMAKE_SYSTEM_NAME} MATCHES "CYGWIN" )
- set( EC_OS_NAME "cygwin" )
- ecbuild_warn( "Building on Cygwin should work but is untested" )
+ set( EC_OS_NAME "cygwin" )
+ ecbuild_warn( "Building on Cygwin should work but is untested" )
endif()
@@ -393,12 +390,12 @@ endif()
if( ${EC_OS_NAME} MATCHES "UNKNOWN" )
- if( DISABLE_OS_CHECK )
- ecbuild_warn( "ecBuild is untested for this operating system: [${CMAKE_SYSTEM_NAME}]"
+ if( DISABLE_OS_CHECK )
+ ecbuild_warn( "ecBuild is untested for this operating system: [${CMAKE_SYSTEM_NAME}]"
" -- DISABLE_OS_CHECK is ON so proceeding at your own risk ..." )
- else()
- ecbuild_critical( "ecBuild is untested for this operating system: [${CMAKE_SYSTEM_NAME}]"
+ else()
+ ecbuild_critical( "ecBuild is untested for this operating system: [${CMAKE_SYSTEM_NAME}]"
" -- refusing to continue. Disable this check with -DDISABLE_OS_CHECK=ON" )
- endif()
+ endif()
endif()
diff --git a/cmake/ecbuild_compiler_flags.cmake b/cmake/ecbuild_compiler_flags.cmake
index 0e3fe1e..a6c2944 100644
--- a/cmake/ecbuild_compiler_flags.cmake
+++ b/cmake/ecbuild_compiler_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -200,6 +200,12 @@ foreach( _lang C CXX Fortran )
endforeach()
# Apply user or toolchain specified linker flag overrides per object type (NOT written to cache)
+foreach( _obj EXE SHARED MODULE )
+ if( ECBUILD_${_obj}_LINKER_FLAGS )
+ set( CMAKE_${_obj}_LINKER_FLAGS ${ECBUILD_${_obj}_LINKER_FLAGS} )
+ endif()
+endforeach()
+
foreach( _btype NONE DEBUG BIT PRODUCTION RELEASE RELWITHDEBINFO )
foreach( _obj EXE SHARED MODULE )
diff --git a/cmake/ecbuild_config.h.in b/cmake/ecbuild_config.h.in
index df9eb91..2eed359 100644
--- a/cmake/ecbuild_config.h.in
+++ b/cmake/ecbuild_config.h.in
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 1996-2016 ECMWF.
+ * (C) Copyright 1996-2017 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_declare_project.cmake b/cmake/ecbuild_declare_project.cmake
index c95e8e3..e2f9cc8 100644
--- a/cmake/ecbuild_declare_project.cmake
+++ b/cmake/ecbuild_declare_project.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_define_build_types.cmake b/cmake/ecbuild_define_build_types.cmake
index cf92d23..7cfc591 100644
--- a/cmake/ecbuild_define_build_types.cmake
+++ b/cmake/ecbuild_define_build_types.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_define_libs_and_execs_target.cmake b/cmake/ecbuild_define_libs_and_execs_target.cmake
index 812f42c..799eb7d 100644
--- a/cmake/ecbuild_define_libs_and_execs_target.cmake
+++ b/cmake/ecbuild_define_libs_and_execs_target.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_define_links_target.cmake b/cmake/ecbuild_define_links_target.cmake
index b5f53fe..745288c 100644
--- a/cmake/ecbuild_define_links_target.cmake
+++ b/cmake/ecbuild_define_links_target.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_define_options.cmake b/cmake/ecbuild_define_options.cmake
index af40ae1..fc6376e 100644
--- a/cmake/ecbuild_define_options.cmake
+++ b/cmake/ecbuild_define_options.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_define_paths.cmake b/cmake/ecbuild_define_paths.cmake
index 6584b26..c5e4830 100644
--- a/cmake/ecbuild_define_paths.cmake
+++ b/cmake/ecbuild_define_paths.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_dont_pack.cmake b/cmake/ecbuild_dont_pack.cmake
index bc62182..9f9f4a4 100644
--- a/cmake/ecbuild_dont_pack.cmake
+++ b/cmake/ecbuild_dont_pack.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_download_resource.cmake b/cmake/ecbuild_download_resource.cmake
index 5d394f5..e1e8eff 100644
--- a/cmake/ecbuild_download_resource.cmake
+++ b/cmake/ecbuild_download_resource.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -18,25 +18,53 @@
#
# curl or wget is required (curl is preferred if available).
#
+# The default timeout is 30 seconds, which can be overridden with
+# ``ECBUILD_DOWNLOAD_TIMEOUT``. Downloads are by default only tried once, use
+# ``ECBUILD_DOWNLOAD_RETRIES`` to set the number of retries.
+#
##############################################################################
function( ecbuild_download_resource _p_OUT _p_URL )
+ # Do not retry downloads by default (ECBUILD-307)
+ if( NOT DEFINED ECBUILD_DOWNLOAD_RETRIES )
+ set( ECBUILD_DOWNLOAD_RETRIES 0 )
+ endif()
+ # Use default timeout of 30s if not specified (ECBUILD-307)
+ if( NOT DEFINED ECBUILD_DOWNLOAD_TIMEOUT )
+ set( ECBUILD_DOWNLOAD_TIMEOUT 30 )
+ endif()
+
if( NOT EXISTS ${_p_OUT} )
find_program( CURL_PROGRAM curl )
mark_as_advanced(CURL_PROGRAM)
if( CURL_PROGRAM )
- execute_process( COMMAND ${CURL_PROGRAM} --silent --show-error --fail --output ${_p_OUT} ${_p_URL}
+
+ execute_process( COMMAND ${CURL_PROGRAM} --silent --show-error --fail
+ --retry ${ECBUILD_DOWNLOAD_RETRIES}
+ --connect-timeout ${ECBUILD_DOWNLOAD_TIMEOUT}
+ --output ${_p_OUT} ${_p_URL}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} RESULT_VARIABLE CMD_RESULT )
+
else()
+
find_program( WGET_PROGRAM wget )
+
if( WGET_PROGRAM )
- execute_process( COMMAND ${WGET_PROGRAM} -nv -O ${_p_OUT} ${_p_URL}
+
+ # wget takes the total number of tries, curl the number or retries
+ math( EXPR ECBUILD_DOWNLOAD_RETRIES ${ECBUILD_DOWNLOAD_RETRIES} + 1 )
+
+ execute_process( COMMAND ${WGET_PROGRAM} -nv -O ${_p_OUT}
+ -t ${ECBUILD_DOWNLOAD_RETRIES}
+ -T ${ECBUILD_DOWNLOAD_TIMEOUT} ${_p_URL}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} RESULT_VARIABLE CMD_RESULT )
+
else()
ecbuild_critical("Could not find curl or wget. Error downloading ${_p_URL}")
endif()
+
endif()
if(CMD_RESULT)
diff --git a/cmake/ecbuild_echo_targets.cmake b/cmake/ecbuild_echo_targets.cmake
index 1406a1f..61250ee 100644
--- a/cmake/ecbuild_echo_targets.cmake
+++ b/cmake/ecbuild_echo_targets.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_enable_fortran.cmake b/cmake/ecbuild_enable_fortran.cmake
index c1c5503..9d86aa7 100644
--- a/cmake/ecbuild_enable_fortran.cmake
+++ b/cmake/ecbuild_enable_fortran.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -58,11 +58,19 @@ macro( ecbuild_enable_fortran )
endif()
if( CMAKE_Fortran_COMPILER_LOADED )
+
include(CheckFortranFunctionExists)
if( CMAKE_C_COMPILER_LOADED AND ENABLE_FORTRAN_C_INTERFACE )
include(FortranCInterface)
endif()
set( EC_HAVE_FORTRAN 1 )
+
+ # see issue ECBUILD-298
+ if( CMAKE_Fortran_COMPILER_ID MATCHES PGI )
+ unset( CMAKE_Fortran_COMPILE_OPTIONS_PIE )
+ unset( CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS )
+ endif()
+
endif()
if( DEFINED _PAR_MODULE_DIRECTORY )
diff --git a/cmake/ecbuild_features.cmake b/cmake/ecbuild_features.cmake
index 6d20038..9406fd8 100644
--- a/cmake/ecbuild_features.cmake
+++ b/cmake/ecbuild_features.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -55,44 +55,3 @@ function( ecbuild_disable_feature _name )
set_property(GLOBAL PROPERTY DISABLED_FEATURES "${_disabled_features}" )
endfunction()
-
-# en/disable feature ${_name} and set its description and purpose
-function( ecbuild_set_feature _name )
-
- set(options ) # none
- set(oneValueArgs ENABLED )
- set(multiValueArgs ) # none
-
- cmake_parse_arguments( _PAR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
-
- get_property( _feature_desc GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION )
- get_property( _enabled_features GLOBAL PROPERTY ENABLED_FEATURES )
- get_property( _disabled_features GLOBAL PROPERTY DISABLED_FEATURES )
-
- if( DEFINED _PAR_ENABLED )
- if( _PAR_ENABLED )
- ecbuild_debug( "ecbuild_set_feature(${_name}): enabling feature" )
- ecbuild_enable_feature( ${_name} )
- else()
- ecbuild_debug( "ecbuild_set_feature(${_name}): disabling feature" )
- ecbuild_disable_feature( ${_name} )
- endif()
- endif()
-
- ecbuild_enabled_features( _enabled_features )
- list (FIND _enabled_features "${_name}" _index)
- if (${_index} GREATER -1)
- set( _feature_found 1 )
- endif()
-
- ecbuild_disabled_features( _disabled_features )
- list (FIND _disabled_features "${_name}" _index)
- if (${_index} GREATER -1)
- set( _feature_found 1 )
- endif()
-
- if( NOT _feature_found )
- ecbuild_warn( "Feature ${_name} has not yet been enabled or disabled" )
- endif()
-
-endfunction()
diff --git a/cmake/ecbuild_find_fortranlibs.cmake b/cmake/ecbuild_find_fortranlibs.cmake
index 279833f..905d020 100644
--- a/cmake/ecbuild_find_fortranlibs.cmake
+++ b/cmake/ecbuild_find_fortranlibs.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_find_lexyacc.cmake b/cmake/ecbuild_find_lexyacc.cmake
index 5c13269..3dc8b61 100644
--- a/cmake/ecbuild_find_lexyacc.cmake
+++ b/cmake/ecbuild_find_lexyacc.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_find_mpi.cmake b/cmake/ecbuild_find_mpi.cmake
index a0c6cfa..85ae5e1 100644
--- a/cmake/ecbuild_find_mpi.cmake
+++ b/cmake/ecbuild_find_mpi.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_find_omp.cmake b/cmake/ecbuild_find_omp.cmake
index 914da24..ea9da24 100644
--- a/cmake/ecbuild_find_omp.cmake
+++ b/cmake/ecbuild_find_omp.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_find_package.cmake b/cmake/ecbuild_find_package.cmake
index f7f1a9c..3520d12 100644
--- a/cmake/ecbuild_find_package.cmake
+++ b/cmake/ecbuild_find_package.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -17,6 +17,11 @@
# ecbuild_find_package( NAME <name>
# [ VERSION <version> [ EXACT ] ]
# [ COMPONENTS <component1> [ <component2> ... ] ]
+# [ URL <url> ]
+# [ DESCRIPTION <description> ]
+# [ TYPE <type> ]
+# [ PURPOSE <purpose> ]
+# [ FAILURE_MSG <message> ]
# [ REQUIRED ]
# [ QUIET ] )
#
@@ -35,6 +40,23 @@
# EXACT : optional, requires VERSION
# require the exact version rather than a minimum version
#
+# URL : optional
+# homepage of the package (shown in summary and stored in the cache)
+#
+# DESCRIPTION : optional
+# literal string or name of CMake variable describing the package
+#
+# TYPE : optional, one of RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED
+# type of dependency of the project on this package (defaults to OPTIONAL)
+#
+# PURPOSE : optional
+# literal string or name of CMake variable describing which functionality
+# this package enables in the project
+#
+# FAILURE_MSG : optional
+# literal string or name of CMake variable containing a message to be
+# appended to the failure message if the package is not found
+#
# REQUIRED : optional
# fail if package cannot be found
#
@@ -86,7 +108,7 @@
macro( ecbuild_find_package )
set( options REQUIRED QUIET EXACT )
- set( single_value_args NAME VERSION )
+ set( single_value_args NAME VERSION URL DESCRIPTION TYPE PURPOSE FAILURE_MSG )
set( multi_value_args COMPONENTS )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
@@ -103,6 +125,12 @@ macro( ecbuild_find_package )
ecbuild_critical("Call to ecbuild_find_package() requests EXACT but doesn't specify VERSION.")
endif()
+ # If the package is required, set TYPE to REQUIRED
+ # Due to shortcomings in CMake's argument parser, passing TYPE REQUIRED has no effect
+ if( _PAR_REQUIRED )
+ set( _PAR_TYPE REQUIRED )
+ endif()
+
# ecbuild_debug_var( _PAR_NAME )
string( TOUPPER ${_PAR_NAME} pkgUPPER )
@@ -191,10 +219,10 @@ macro( ecbuild_find_package )
if( NOT ${_PAR_NAME}_FOUND )
if( ${_PAR_NAME}_PATH )
- ecbuild_critical( "${_PAR_NAME}_PATH was provided by user but package ${_PAR_NAME} wasn't found" )
+ ecbuild_critical( "${_PAR_NAME}_PATH was provided by user but package ${_PAR_NAME} wasn't found at '${${_PAR_NAME}_PATH}'" )
endif()
if( ${pkgUPPER}_PATH )
- ecbuild_critical( "${pkgUPPER}_PATH was provided by user but package ${_PAR_NAME} wasn't found" )
+ ecbuild_critical( "${pkgUPPER}_PATH was provided by user but package ${_PAR_NAME} wasn't found at '${${pkgUPPER}_PATH}'" )
endif()
endif()
@@ -226,6 +254,9 @@ macro( ecbuild_find_package )
if( NOT ${_PAR_NAME}_FOUND )
ecbuild_debug("ecbuild_find_package(${_PAR_NAME}): 5) search system paths, for ${_PAR_NAME}-config.cmake")
+ ecbuild_debug("find_package( ${_PAR_NAME} ${_${pkgUPPER}_version} ${_find_quiet} NO_MODULE
+ COMPONENTS ${_PAR_COMPONENTS}
+ ${NO_DEV_BUILD_DIRS} )")
find_package( ${_PAR_NAME} ${_${pkgUPPER}_version} ${_find_quiet} NO_MODULE
COMPONENTS ${_PAR_COMPONENTS}
${NO_DEV_BUILD_DIRS} )
@@ -288,20 +319,8 @@ macro( ecbuild_find_package )
### final messages
- set( _failed_message
- "\n"
- " ${PROJECT_NAME} FAILED to find package ${_PAR_NAME}\n"
- "\n"
- " Provide location with \"-D${pkgUPPER}_PATH=/...\" or \"-D${_PAR_NAME}_DIR=/...\" \n"
- " You may also export environment variables ${pkgUPPER}_PATH or ${_PAR_NAME}_DIR\n"
- "\n"
- " Values (note CAPITALISATION):\n"
- " ${pkgUPPER}_PATH should contain the path to the install prefix (as in <install>/bin <install>/lib <install>/include)\n"
- " ${_PAR_NAME}_DIR should be a directory containing a <package>-config.cmake file (usually <install>/share/<package>/cmake)\n"
- "\n"
- )
-
if( ${_PAR_NAME}_FOUND OR ${pkgUPPER}_FOUND )
+
if( NOT _PAR_QUIET )
ecbuild_info( "[${_PAR_NAME}] (${${_PAR_NAME}_VERSION})" )
foreach( var in ITEMS INCLUDE_DIR INCLUDE_DIRS DEFINITIONS LIBRARY LIBRARIES )
@@ -312,14 +331,41 @@ macro( ecbuild_find_package )
endif()
endforeach()
endif()
+
+ if( DEFINED ${_PAR_DESCRIPTION} )
+ set( _PAR_DESCRIPTION ${${_PAR_DESCRIPTION}} )
+ endif()
+ if( DEFINED ${_PAR_PURPOSE} )
+ set( _PAR_PURPOSE ${${_PAR_PURPOSE}} )
+ endif()
+ set_package_properties( ${_PAR_NAME} PROPERTIES
+ URL "${_PAR_URL}"
+ DESCRIPTION "${_PAR_DESCRIPTION}"
+ TYPE "${_PAR_TYPE}"
+ PURPOSE "${_PAR_PURPOSE}" )
+
else()
+
+ if( DEFINED ${_PAR_FAILURE_MSG} )
+ set( _PAR_FAILURE_MSG ${${_PAR_FAILURE_MSG}} )
+ endif()
+ set( _failed_message
+ " ${PROJECT_NAME} FAILED to find package ${_PAR_NAME}\n"
+ " Provide location with \"-D${pkgUPPER}_PATH=/...\" or \"-D${_PAR_NAME}_DIR=/...\" \n"
+ " You may also export environment variables ${pkgUPPER}_PATH or ${_PAR_NAME}_DIR\n"
+ " Values (note CAPITALISATION):\n"
+ " ${pkgUPPER}_PATH should contain the path to the install prefix (as in <install>/bin <install>/lib <install>/include)\n"
+ " ${_PAR_NAME}_DIR should be a directory containing a <package>-config.cmake file (usually <install>/share/<package>/cmake)\n"
+ )
+
if( _PAR_REQUIRED )
- ecbuild_critical( ${_failed_message} " !! ${PROJECT_NAME} requires package ${_PAR_NAME} !!" )
+ ecbuild_critical( "${_failed_message}!! ${PROJECT_NAME} requires package ${_PAR_NAME} !!\n${_PAR_FAILURE_MSG}" )
else()
if( NOT _PAR_QUIET )
- ecbuild_warn( ${_failed_message} )
+ ecbuild_warn( "${_failed_message}\n${_PAR_FAILURE_MSG}" )
endif()
endif()
+
endif()
endmacro()
diff --git a/cmake/ecbuild_find_perl.cmake b/cmake/ecbuild_find_perl.cmake
index 97b22f8..b6c1825 100644
--- a/cmake/ecbuild_find_perl.cmake
+++ b/cmake/ecbuild_find_perl.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_find_python.cmake b/cmake/ecbuild_find_python.cmake
index d3cf377..0e9adaa 100644
--- a/cmake/ecbuild_find_python.cmake
+++ b/cmake/ecbuild_find_python.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -67,8 +67,10 @@ function( ecbuild_find_python )
ecbuild_critical("Unknown keywords given to ecbuild_find_python(): \"${_p_UNPARSED_ARGUMENTS}\"")
endif()
if( _p_REQUIRED )
+ ecbuild_debug( "ecbuild_find_python: Searching for Python interpreter (required) ..." )
set( _p_REQUIRED REQUIRED )
else()
+ ecbuild_debug( "ecbuild_find_python: Searching for Python interpreter ..." )
unset( _p_REQUIRED )
endif()
@@ -81,7 +83,7 @@ function( ecbuild_find_python )
# If no suitable version was found, search again with the version specified
if( PYTHONINTERP_FOUND AND _p_VERSION )
if( _p_VERSION VERSION_GREATER "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}" )
- ecbuild_debug( "ecbuild_find_python: Found Python interpreter version ${PYTHON_VERSION_STRING} at ${PYTHON_EXECUTABLE}, however version ${_p_VERSION} is required. Searching again..." )
+ ecbuild_debug( "ecbuild_find_python: Found Python interpreter version '${PYTHON_VERSION_STRING}' at '${PYTHON_EXECUTABLE}', however version '${_p_VERSION}' is required. Searching again..." )
unset( PYTHONINTERP_FOUND )
unset( PYTHON_EXECUTABLE )
unset( PYTHON_EXECUTABLE CACHE )
@@ -93,10 +95,14 @@ function( ecbuild_find_python )
endif()
endif()
+ set_package_properties( PythonInterp PROPERTIES
+ URL http://python.org
+ DESCRIPTION "Python interpreter" )
+
set( __required_vars PYTHONINTERP_FOUND )
if( PYTHONINTERP_FOUND )
- ecbuild_debug( "ecbuild_find_python: Found Python interpreter version ${PYTHON_VERSION_STRING} at ${PYTHON_EXECUTABLE}" )
+ ecbuild_debug( "ecbuild_find_python: Found Python interpreter version '${PYTHON_VERSION_STRING}' at '${PYTHON_EXECUTABLE}'" )
# find where python site-packages are ...
@@ -104,10 +110,15 @@ function( ecbuild_find_python )
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
ecbuild_debug( "ecbuild_find_python: PYTHON_SITE_PACKAGES=${PYTHON_SITE_PACKAGES}" )
+ else()
+ ecbuild_debug( "ecbuild_find_python: could NOT find Python interpreter!" )
endif()
- if( PYTHONINTERP_FOUND AND NOT _p_NO_LIBS )
+ if( PYTHONINTERP_FOUND AND _p_NO_LIBS )
+ ecbuild_debug( "ecbuild_find_python: NOT searching for Python libraries" )
+ elseif( PYTHONINTERP_FOUND )
list( APPEND __required_vars PYTHONLIBS_FOUND PYTHON_LIBS_WORKING )
+ ecbuild_debug( "ecbuild_find_python: Searching for Python libraries ..." )
# find python config
@@ -124,7 +135,7 @@ function( ecbuild_find_python )
python-config )
endif()
- ecbuild_debug_var( PYTHON_CONFIG_EXECUTABLE )
+ ecbuild_debug( "ecbuild_find_python: found python-config at '${PYTHON_CONFIG_EXECUTABLE}'" )
# find python libs
@@ -132,33 +143,39 @@ function( ecbuild_find_python )
# that don't reliably report linking flags that will work.
if( PYTHON_CONFIG_EXECUTABLE AND NOT ( PYTHON_NO_CONFIG OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" ) )
- ecbuild_debug( "ecbuild_find_python: Searching for Python include directories and libraries using ${PYTHON_CONFIG_EXECUTABLE}" )
+ ecbuild_debug( "ecbuild_find_python: Searching for Python include directories and libraries using '${PYTHON_CONFIG_EXECUTABLE}'" )
- if( NOT PYTHON_LIBRARY )
+ if( DEFINED PYTHON_LIBRARY )
+ ecbuild_debug( "ecbuild_find_python: PYTHON_LIBRARY already set to '${PYTHON_LIBRARY}'" )
+ else()
execute_process(COMMAND "${PYTHON_CONFIG_EXECUTABLE}" --prefix
OUTPUT_VARIABLE PYTHON_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
+ ecbuild_debug( "ecbuild_find_python: PYTHON_PREFIX=${PYTHON_PREFIX}" )
execute_process(COMMAND "${PYTHON_CONFIG_EXECUTABLE}" --ldflags
OUTPUT_VARIABLE PYTHON_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
+ ecbuild_debug( "ecbuild_find_python: PYTHON_LIBRARY=${PYTHON_LIBRARY}" )
# Prepend -L and and set the RPATH to the lib directory under the
# Python install prefix unless it is a standard system prefix path
if( PYTHON_LIBRARY AND PYTHON_PREFIX AND NOT CMAKE_SYSTEM_PREFIX_PATH MATCHES ${PYTHON_PREFIX} )
+ ecbuild_debug( "ecbuild_find_python: Python libraries not in CMAKE_SYSTEM_PREFIX_PATH, prepending PYTHON_PREFIX '${PYTHON_PREFIX}' to PYTHON_LIBRARY" )
set( PYTHON_LIBRARY "-L${PYTHON_PREFIX}/lib -Wl,-rpath,${PYTHON_PREFIX}/lib ${PYTHON_LIBRARY}" )
endif()
-
- set( PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}" CACHE PATH
- "Path to where Python.h is found" FORCE )
endif()
- if(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
+ if( DEFINED PYTHON_INCLUDE_DIR )
+ ecbuild_debug( "ecbuild_find_python: PYTHON_INCLUDE_DIR already set to '${PYTHON_INCLUDE_DIR}'" )
+ elseif(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
+ ecbuild_debug( "ecbuild_find_python: PYTHON_INCLUDE_PATH already set to '${PYTHON_INCLUDE_PATH}'" )
+ ecbuild_deprecate( "ecbuild_find_python: PYTHON_INCLUDE_PATH is deprecated, use PYTHON_INCLUDE_DIR instead!" )
set( PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
"Path to where Python.h is found" FORCE )
- elseif( NOT PYTHON_INCLUDE_DIR )
+ else()
execute_process(COMMAND "${PYTHON_CONFIG_EXECUTABLE}" --includes
OUTPUT_VARIABLE PYTHON_INCLUDE_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -168,6 +185,7 @@ function( ecbuild_find_python )
string(REGEX REPLACE "[ ]-I" " " PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}")
separate_arguments(PYTHON_INCLUDE_DIR)
+ ecbuild_debug( "ecbuild_find_python: PYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}" )
set( PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}" CACHE PATH
"Path to where Python.h is found" FORCE )
@@ -184,23 +202,34 @@ function( ecbuild_find_python )
find_package( PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}" ${_p_REQUIRED} )
+ set_package_properties( PythonLibs PROPERTIES
+ URL http://python.org
+ DESCRIPTION "Python library and header" )
+
endif()
# Remove duplicate include directories
list(REMOVE_DUPLICATES PYTHON_INCLUDE_DIRS)
+ ecbuild_debug( "ecbuild_find_python: PYTHON_INCLUDE_DIRS=${PYTHON_INCLUDE_DIRS}" )
+ ecbuild_debug( "ecbuild_find_python: PYTHON_LIBRARIES=${PYTHON_LIBRARIES}" )
if( PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS )
+ ecbuild_debug( "ecbuild_find_python: trying to link executable with Python libraries ..." )
# Test if we can link against the Python libraries and include Python.h
try_compile( PYTHON_LIBS_WORKING ${CMAKE_CURRENT_BINARY_DIR}
${__test_python}
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${PYTHON_INCLUDE_DIRS}"
LINK_LIBRARIES ${PYTHON_LIBRARIES}
OUTPUT_VARIABLE __try_compile_output )
- if( NOT PYTHON_LIBS_WORKING )
+ if( PYTHON_LIBS_WORKING )
+ ecbuild_debug( "ecbuild_find_python: trying to link executable with Python libraries successful" )
+ else()
ecbuild_debug( "ecbuild_find_python: trying to link executable with Python libraries failed\n${__try_compile_output}" )
endif()
+ else()
+ ecbuild_debug( "ecbuild_find_python: Python library and include diretory not found" )
endif()
endif()
diff --git a/cmake/ecbuild_generate_config_headers.cmake b/cmake/ecbuild_generate_config_headers.cmake
index 6bc8301..8f2d44e 100644
--- a/cmake/ecbuild_generate_config_headers.cmake
+++ b/cmake/ecbuild_generate_config_headers.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_generate_fortran_interfaces.cmake b/cmake/ecbuild_generate_fortran_interfaces.cmake
index 93c7414..a127315 100644
--- a/cmake/ecbuild_generate_fortran_interfaces.cmake
+++ b/cmake/ecbuild_generate_fortran_interfaces.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_generate_rpc.cmake b/cmake/ecbuild_generate_rpc.cmake
index f06624f..e475f19 100644
--- a/cmake/ecbuild_generate_rpc.cmake
+++ b/cmake/ecbuild_generate_rpc.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_generate_yy.cmake b/cmake/ecbuild_generate_yy.cmake
index 35088fb..ea7ec13 100644
--- a/cmake/ecbuild_generate_yy.cmake
+++ b/cmake/ecbuild_generate_yy.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_get_cxx11_flags.cmake b/cmake/ecbuild_get_cxx11_flags.cmake
index a97fe11..acb0b21 100644
--- a/cmake/ecbuild_get_cxx11_flags.cmake
+++ b/cmake/ecbuild_get_cxx11_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_get_date.cmake b/cmake/ecbuild_get_date.cmake
index 730ea54..0f94d7d 100644
--- a/cmake/ecbuild_get_date.cmake
+++ b/cmake/ecbuild_get_date.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_get_resources.cmake b/cmake/ecbuild_get_resources.cmake
index f531d82..d6c20e4 100644
--- a/cmake/ecbuild_get_resources.cmake
+++ b/cmake/ecbuild_get_resources.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_get_test_data.cmake b/cmake/ecbuild_get_test_data.cmake
index 42185f1..37ea904 100644
--- a/cmake/ecbuild_get_test_data.cmake
+++ b/cmake/ecbuild_get_test_data.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -19,6 +19,15 @@ function( _download_test_data _p_NAME _p_DIRNAME )
#set(ENV{http_proxy} "http://proxy.ecmwf.int:3333")
#endif()
+ # Do not retry downloads by default (ECBUILD-307)
+ if( NOT DEFINED ECBUILD_DOWNLOAD_RETRIES )
+ set( ECBUILD_DOWNLOAD_RETRIES 0 )
+ endif()
+ # Use default timeout of 30s if not specified (ECBUILD-307)
+ if( NOT DEFINED ECBUILD_DOWNLOAD_TIMEOUT )
+ set( ECBUILD_DOWNLOAD_TIMEOUT 30 )
+ endif()
+
find_program( CURL_PROGRAM curl )
mark_as_advanced(CURL_PROGRAM)
@@ -27,6 +36,8 @@ function( _download_test_data _p_NAME _p_DIRNAME )
add_custom_command( OUTPUT ${_p_NAME}
COMMENT "(curl) downloading http://download.ecmwf.org/test-data/${_p_DIRNAME}/${_p_NAME}"
COMMAND ${CURL_PROGRAM} --silent --show-error --fail --output ${_p_NAME}
+ --retry ${ECBUILD_DOWNLOAD_RETRIES}
+ --connect-timeout ${ECBUILD_DOWNLOAD_TIMEOUT}
http://download.ecmwf.org/test-data/${_p_DIRNAME}/${_p_NAME} )
else()
@@ -35,9 +46,13 @@ function( _download_test_data _p_NAME _p_DIRNAME )
if( WGET_PROGRAM )
+ # wget takes the total number of tries, curl the number or retries
+ math( EXPR ECBUILD_DOWNLOAD_RETRIES ${ECBUILD_DOWNLOAD_RETRIES} + 1 )
+
add_custom_command( OUTPUT ${_p_NAME}
COMMENT "(wget) downloading http://download.ecmwf.org/test-data/${_p_DIRNAME}/${_p_NAME}"
COMMAND ${WGET_PROGRAM} -nv -O ${_p_NAME}
+ -t ${ECBUILD_DOWNLOAD_RETRIES} -T ${ECBUILD_DOWNLOAD_TIMEOUT}
http://download.ecmwf.org/test-data/${_p_DIRNAME}/${_p_NAME} )
else()
@@ -105,6 +120,10 @@ endfunction()
# given as the ``MD5`` argument or downloaded from the server otherwise. Use
# the argument ``NOCHECK`` to disable this check.
#
+# The default timeout is 30 seconds, which can be overridden with
+# ``ECBUILD_DOWNLOAD_TIMEOUT``. Downloads are by default only tried once, use
+# ``ECBUILD_DOWNLOAD_RETRIES`` to set the number of retries.
+#
# Examples
# --------
#
diff --git a/cmake/ecbuild_git.cmake b/cmake/ecbuild_git.cmake
index 0a378a6..b2d38fa 100644
--- a/cmake/ecbuild_git.cmake
+++ b/cmake/ecbuild_git.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_install_project.cmake b/cmake/ecbuild_install_project.cmake
index 5e26bea..ddba836 100644
--- a/cmake/ecbuild_install_project.cmake
+++ b/cmake/ecbuild_install_project.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -70,6 +70,17 @@
#
##############################################################################
+function( ecbuild_set_if_not_defined VAR VALUE )
+
+ if(NOT DEFINED ${VAR})
+ set( ${VAR} "${VALUE}" PARENT_SCOPE )
+ # ecbuild_info("Variable not defined, setting ${VAR} => ${VALUE}")
+ # else()
+ # ecbuild_info("${VAR} == ${${VAR}}")
+ endif()
+
+endfunction()
+
macro( ecbuild_install_project )
set( options )
@@ -112,36 +123,34 @@ macro( ecbuild_install_project )
# name, version, etc ...
- set(CPACK_PACKAGE_NAME "${_PAR_NAME}")
- set(CPACK_PACKAGE_VERSION "${${PNAME}_VERSION_STR}")
-
- set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
+ ecbuild_set_if_not_defined(CPACK_PACKAGE_NAME "${_PAR_NAME}")
+ ecbuild_set_if_not_defined(CPACK_PACKAGE_VERSION "${${PNAME}_VERSION_STR}")
- set(CPACK_DEBIAN_PACKAGE_MAINTAINER "ECMWF") # required for DEB
+ ecbuild_set_if_not_defined(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
+ # set(CPACK_DEBIAN_PACKAGE_MAINTAINER "ECMWF") # required for DEB
# set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON")
# set(CPACK_RPM_COMPONENT_INSTALL "ON")
- # set(CPACK_GENERATOR "TGZ;RPM;DEB")
- set(CPACK_GENERATOR "TGZ")
- set(CPACK_SOURCE_GENERATOR "TGZ")
- set(CPACK_PACKAGE_VENDOR "ECMWF")
+ ecbuild_set_if_not_defined(CPACK_SOURCE_GENERATOR "TGZ")
+ ecbuild_set_if_not_defined(CPACK_GENERATOR "TGZ")
+ ecbuild_set_if_not_defined(CPACK_PACKAGE_VENDOR "ECMWF")
# short description
if( _PAR_DESCRIPTION )
- set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${_PAR_DESCRIPTION}" )
+ ecbuild_set_if_not_defined(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${_PAR_DESCRIPTION}" )
else()
- set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${_PAR_NAME} misses a description" )
+ ecbuild_set_if_not_defined(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${_PAR_NAME} misses a description" )
endif()
# long description
if( EXISTS ${PROJECT_SOURCE_DIR}/INSTALL )
- set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/INSTALL")
+ ecbuild_set_if_not_defined(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/INSTALL")
endif()
if( EXISTS ${PROJECT_SOURCE_DIR}/LICENSE )
- set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
+ ecbuild_set_if_not_defined(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
endif()
# set(CPACK_PACKAGE_EXECUTABLES ${ECBUILD_ALL_EXES})
diff --git a/cmake/ecbuild_list_add_pattern.cmake b/cmake/ecbuild_list_add_pattern.cmake
index 0f68217..a0f9f34 100644
--- a/cmake/ecbuild_list_add_pattern.cmake
+++ b/cmake/ecbuild_list_add_pattern.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_list_exclude_pattern.cmake b/cmake/ecbuild_list_exclude_pattern.cmake
index 7e02f47..bfb6ee8 100644
--- a/cmake/ecbuild_list_exclude_pattern.cmake
+++ b/cmake/ecbuild_list_exclude_pattern.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_list_extra_search_paths.cmake b/cmake/ecbuild_list_extra_search_paths.cmake
index b81f062..1ba31bc 100644
--- a/cmake/ecbuild_list_extra_search_paths.cmake
+++ b/cmake/ecbuild_list_extra_search_paths.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_list_macros.cmake b/cmake/ecbuild_list_macros.cmake
index 176a161..232e5e8 100644
--- a/cmake/ecbuild_list_macros.cmake
+++ b/cmake/ecbuild_list_macros.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_log.cmake b/cmake/ecbuild_log.cmake
index 32a1398..ca058fe 100644
--- a/cmake/ecbuild_log.cmake
+++ b/cmake/ecbuild_log.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -27,9 +27,10 @@
# Furthermore there are auxilliary functions for outputting CMake variables,
# CMake lists and environment variables if the log level is ``DEBUG``:
#
-# :ecbuild_debug_var: logs given CMake variables if log level <= ``DEBUG``
-# :ecbuild_debug_list: logs given CMake lists if log level <= ``DEBUG``
-# :ecbuild_debug_env_var: logs given environment variables if log level <= ``DEBUG``
+# :ecbuild_debug_var: logs given CMake variables if log level <= ``DEBUG``
+# :ecbuild_debug_list: logs given CMake lists if log level <= ``DEBUG``
+# :ecbuild_debug_env_var: logs given environment variables if log level <= ``DEBUG``
+# :ecbuild_debug_property: logs given global CMake property if log level <= ``DEBUG``
#
# To log a message to the ecBuild log file only at a given log level, use ::
#
@@ -235,31 +236,14 @@ function( ecbuild_debug_env_var )
endfunction()
##############################################################################
-# macro for debugging a cmake variable
+# function for debugging a CMake global property
-macro( debug_var VAR )
-
- message( WARNING "DEPRECATED debug_var() -- ${VAR} [${${VAR}}]" )
-
-endmacro()
-
-##############################################################################
-# macro for debugging a cmake list
-
-macro( debug_list VAR )
-
- message( WARNING "DEPRECATED debug_list() -- ${VAR}:" )
- foreach( _elem ${${VAR}} )
- message( WARNING " ${_elem}" )
- endforeach()
-
-endmacro()
-
-##############################################################################
-# macro for debugging a environment variable within cmake
-
-macro( debug_env_var VAR )
-
- message( WARNING "DEPRECATED debug_env_var() -- ENV ${VAR} [$ENV{${VAR}}]" )
-
-endmacro()
+function( ecbuild_debug_property )
+ foreach( VAR ${ARGV} )
+ get_property( __prop GLOBAL PROPERTY ${VAR} )
+ ecbuild_log(DEBUG "PROPERTY ${VAR} : ${__prop}")
+ if( ECBUILD_LOG_LEVEL LESS 11)
+ message(STATUS "${Blue}DEBUG - PROPERTY ${VAR} [${__prop}]${ColourReset}")
+ endif()
+ endforeach()
+endfunction()
diff --git a/cmake/ecbuild_pkgconfig.cmake b/cmake/ecbuild_pkgconfig.cmake
index d839a86..ed1076d 100644
--- a/cmake/ecbuild_pkgconfig.cmake
+++ b/cmake/ecbuild_pkgconfig.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_policies.cmake b/cmake/ecbuild_policies.cmake
index 36ab7fe..df2b40f 100644
--- a/cmake/ecbuild_policies.cmake
+++ b/cmake/ecbuild_policies.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_print_summary.cmake b/cmake/ecbuild_print_summary.cmake
index 6fc70d0..c863e60 100644
--- a/cmake/ecbuild_print_summary.cmake
+++ b/cmake/ecbuild_print_summary.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -89,17 +89,23 @@ macro( ecbuild_print_summary )
ecbuild_info( "common definitions: ${defs}" )
- ecbuild_info( "---------------------------------------------------------" )
-
### FEATURE SUMMARY
- # ecbuild_debug_var( CMAKE_VERSION )
+ ecbuild_info( "---------------------------------------------------------" )
+ ecbuild_info( "Feature summary" )
+ ecbuild_info( "---------------------------------------------------------" )
+
if( ${CMAKE_VERSION} VERSION_LESS "2.8.6" )
- feature_summary( WHAT ALL )
+ set( __what ALL )
else()
- feature_summary( WHAT ALL INCLUDE_QUIET_PACKAGES )
+ set( __what ALL INCLUDE_QUIET_PACKAGES )
endif()
+ # Print feature summary
+ feature_summary( WHAT ${__what} )
+ # Write feature summary to ecbuild.log
+ feature_summary( WHAT ${__what} FILENAME ${ECBUILD_LOG_FILE} APPEND )
+
### WARNINGS
# issue warnings / errors in case there are unused project files
diff --git a/cmake/ecbuild_project_files.cmake b/cmake/ecbuild_project_files.cmake
index 3e4b3d2..12c07c2 100644
--- a/cmake/ecbuild_project_files.cmake
+++ b/cmake/ecbuild_project_files.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_remove_fortran_flags.cmake b/cmake/ecbuild_remove_fortran_flags.cmake
index 3a80316..2a41f04 100644
--- a/cmake/ecbuild_remove_fortran_flags.cmake
+++ b/cmake/ecbuild_remove_fortran_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_requires_macro_version.cmake b/cmake/ecbuild_requires_macro_version.cmake
index 1603446..8ff5617 100644
--- a/cmake/ecbuild_requires_macro_version.cmake
+++ b/cmake/ecbuild_requires_macro_version.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_separate_sources.cmake b/cmake/ecbuild_separate_sources.cmake
index 00722ae..69b6810 100644
--- a/cmake/ecbuild_separate_sources.cmake
+++ b/cmake/ecbuild_separate_sources.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -37,10 +37,11 @@
# :<target>_cxx_srcs: source files with extension .cc, .cxx, .cpp, .C
# :<target>_fortran_srcs: source files with extension .f, .F, .for, f77, .f90,
# .f95, .F77, .F90, .F95
+# :<target>_cuda_srcs: source files with extension .cu
#
##############################################################################
-macro( ecbuild_separate_sources )
+function( ecbuild_separate_sources )
set( options )
set( single_value_args TARGET )
@@ -83,11 +84,20 @@ macro( ecbuild_separate_sources )
list( APPEND ${_PAR_TARGET}_fortran_srcs ${src} )
endif()
endforeach()
- set_source_files_properties( ${${_PAR_TARGET}_fortran_srcs} PROPERTIES LANGUAGE Fortran )
-# ecbuild_debug_var( ${_PAR_TARGET}_h_srcs )
-# ecbuild_debug_var( ${_PAR_TARGET}_c_srcs )
-# ecbuild_debug_var( ${_PAR_TARGET}_cxx_srcs )
-# ecbuild_debug_var( ${_PAR_TARGET}_fortran_srcs )
+ foreach( src ${_PAR_SOURCES} )
+ if(${src} MATCHES "(\\.cu$)")
+ list( APPEND ${_PAR_TARGET}_cuda_srcs ${src} )
+ endif()
+ endforeach()
-endmacro( ecbuild_separate_sources )
+ set_source_files_properties( ${${_PAR_TARGET}_fortran_srcs} PROPERTIES LANGUAGE Fortran )
+
+ set( ${_PAR_TARGET}_h_srcs "${${_PAR_TARGET}_h_srcs}" PARENT_SCOPE )
+ set( ${_PAR_TARGET}_c_srcs "${${_PAR_TARGET}_c_srcs}" PARENT_SCOPE )
+ set( ${_PAR_TARGET}_cxx_srcs "${${_PAR_TARGET}_cxx_srcs}" PARENT_SCOPE )
+ set( ${_PAR_TARGET}_fortran_srcs "${${_PAR_TARGET}_fortran_srcs}" PARENT_SCOPE )
+ set( ${_PAR_TARGET}_cuda_srcs "${${_PAR_TARGET}_cuda_srcs}" PARENT_SCOPE )
+
+
+endfunction( ecbuild_separate_sources )
diff --git a/cmake/ecbuild_source_flags.cmake b/cmake/ecbuild_source_flags.cmake
index a281f1d..bd63258 100644
--- a/cmake/ecbuild_source_flags.cmake
+++ b/cmake/ecbuild_source_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_system.cmake b/cmake/ecbuild_system.cmake
index f02113e..10af0c8 100644
--- a/cmake/ecbuild_system.cmake
+++ b/cmake/ecbuild_system.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -62,6 +62,12 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
# Include log macros since these are used right away
include( ecbuild_log )
+ execute_process( COMMAND env OUTPUT_VARIABLE __env )
+ ecbuild_debug( "---------------------------------------------------------" )
+ ecbuild_debug( "Environment:" )
+ ecbuild_debug( "---------------------------------------------------------\n${__env}" )
+ ecbuild_debug( "---------------------------------------------------------" )
+
ecbuild_info( "ecbuild ${ecbuild_VERSION_STR}\t${ECBUILD_MACROS_DIR}" )
ecbuild_info( "cmake ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}\t${CMAKE_COMMAND}" )
@@ -78,7 +84,7 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
ecbuild_info( "cache ${ECBUILD_CACHE}" )
endif()
- message( STATUS "---------------------------------------------------------" )
+ ecbuild_info( "---------------------------------------------------------" )
# clear the build dir exported targets file (only on the top project)
@@ -250,7 +256,7 @@ if( PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
set( EC_BUILD_TIMESTAMP "${EC_BUILD_TIMESTAMP}" CACHE INTERNAL "Build timestamp" )
endif()
- message( STATUS "---------------------------------------------------------" )
+ ecbuild_info( "---------------------------------------------------------" )
else()
@@ -259,7 +265,7 @@ else()
# or
# set( ECBUILD_CONFIG "<subproject-config>.cmake" )
if( ECBUILD_CONFIG )
- message( STATUS "---------------------------------------------------------" )
+ ecbuild_info( "---------------------------------------------------------" )
ecbuild_info( "config ${ECBUILD_CONFIG}" )
include( ${ECBUILD_CONFIG} )
endif()
diff --git a/cmake/ecbuild_target_flags.cmake b/cmake/ecbuild_target_flags.cmake
index 4c589af..b6527d1 100644
--- a/cmake/ecbuild_target_flags.cmake
+++ b/cmake/ecbuild_target_flags.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_use_package.cmake b/cmake/ecbuild_use_package.cmake
index c88bca8..d54e459 100644
--- a/cmake/ecbuild_use_package.cmake
+++ b/cmake/ecbuild_use_package.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
@@ -16,6 +16,11 @@
#
# ecbuild_use_package( PROJECT <name>
# [ VERSION <version> [ EXACT ] ]
+# [ URL <url> ]
+# [ DESCRIPTION <description> ]
+# [ TYPE <type> ]
+# [ PURPOSE <purpose> ]
+# [ FAILURE_MSG <message> ]
# [ REQUIRED ]
# [ QUIET ] )
#
@@ -31,6 +36,21 @@
# EXACT : optional, requires VERSION
# require the exact version rather than a minimum version
#
+# URL : optional
+# homepage of the package (shown in summary and stored in the cache)
+#
+# DESCRIPTION : optional
+# string describing the package (shown in summary and stored in the cache)
+#
+# TYPE : optional, one of RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED
+# type of dependency of the project on this package (defaults to OPTIONAL)
+#
+# PURPOSE : optional
+# string describing which functionality this package enables in the project
+#
+# FAILURE_MSG : optional
+# string to be appended to the failure message if the package is not found
+#
# REQUIRED : optional
# fail if package cannot be found
#
@@ -81,7 +101,7 @@
macro( ecbuild_use_package )
set( options REQUIRED QUIET EXACT )
- set( single_value_args PROJECT VERSION )
+ set( single_value_args PROJECT VERSION URL DESCRIPTION TYPE PURPOSE FAILURE_MSG )
set( multi_value_args )
cmake_parse_arguments( _p "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )
@@ -98,6 +118,12 @@ macro( ecbuild_use_package )
ecbuild_critical("Call to ecbuild_use_package() requests EXACT but doesn't specify VERSION.")
endif()
+ # If the package is required, set TYPE to REQUIRED
+ # Due to shortcomings in CMake's argument parser, passing TYPE REQUIRED has no effect
+ if( _p_REQUIRED )
+ set( _p_TYPE REQUIRED )
+ endif()
+
# try to find the package as a subproject and build it
string( TOUPPER ${_p_PROJECT} pkgUPPER )
@@ -252,7 +278,16 @@ macro( ecbuild_use_package )
# Case 4) is NOT FOUND so far, NOT as sub-project (now or before), and NOT as binary neither
# so try to find precompiled binaries or a build tree
- if( NOT ${pkgUPPER}_FOUND )
+ if( ${pkgUPPER}_FOUND )
+ # Only set package properties if ecbuild_find_package, which itself calls
+ # set_package_properties, is not subsequently called since doing so would
+ # duplicate the purpose
+ set_package_properties( ${_p_PROJECT} PROPERTIES
+ URL "${_p_URL}"
+ DESCRIPTION "${_p_DESCRIPTION}"
+ TYPE "${_p_TYPE}"
+ PURPOSE "${_p_PURPOSE}" )
+ else()
ecbuild_debug("ecbuild_use_package(${_p_PROJECT}): 4) project has NOT been added as a subproject and is NOT already FOUND")
@@ -266,6 +301,22 @@ macro( ecbuild_use_package )
if( _p_REQUIRED )
list( APPEND _opts REQUIRED )
endif()
+ if( _p_URL )
+ list( APPEND _opts URL ${_p_URL} )
+ endif()
+ if( _p_DESCRIPTION )
+ list( APPEND _opts DESCRIPTION "${_p_DESCRIPTION}" )
+ endif()
+ if( _p_TYPE )
+ list( APPEND _opts TYPE ${_p_TYPE} )
+ endif()
+ if( _p_PURPOSE )
+ list( APPEND _opts PURPOSE "${_p_PURPOSE}" )
+ endif()
+ if( _p_FAILURE_MSG )
+ ecbuild_debug_var( _p_FAILURE_MSG )
+ list( APPEND _opts FAILURE_MSG "${_p_FAILURE_MSG}" )
+ endif()
ecbuild_find_package( NAME ${_p_PROJECT} ${_opts} )
diff --git a/cmake/ecbuild_version.h.in b/cmake/ecbuild_version.h.in
index 70c5f0a..89b0e33 100644
--- a/cmake/ecbuild_version.h.in
+++ b/cmake/ecbuild_version.h.in
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 1996-2016 ECMWF.
+ * (C) Copyright 1996-2017 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/ecbuild_warn_unused_files.cmake b/cmake/ecbuild_warn_unused_files.cmake
index 314a006..7d330d7 100644
--- a/cmake/ecbuild_warn_unused_files.cmake
+++ b/cmake/ecbuild_warn_unused_files.cmake
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/gen_source_flags.py b/cmake/gen_source_flags.py
index b976d31..c08ad08 100644
--- a/cmake/gen_source_flags.py
+++ b/cmake/gen_source_flags.py
@@ -1,4 +1,4 @@
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/include/ecbuild/boost_test_framework.h b/cmake/include/ecbuild/boost_test_framework.h
index f593b70..ba48689 100644
--- a/cmake/include/ecbuild/boost_test_framework.h
+++ b/cmake/include/ecbuild/boost_test_framework.h
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 1996-2016 ECMWF.
+ * (C) Copyright 1996-2017 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/cmake/sg.pl b/cmake/sg.pl
index 6bce843..f8c8e31 100755
--- a/cmake/sg.pl
+++ b/cmake/sg.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#!/usr/local/share/perl56
-# (C) Copyright 1996-2016 ECMWF.
+# (C) Copyright 1996-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/pbio/emosnum.F b/pbio/emosnum.F
index 60014e4..430d229 100644
--- a/pbio/emosnum.F
+++ b/pbio/emosnum.F
@@ -88,7 +88,7 @@ C
CHARACTER*35 CMESS
C CHARACTER*20 YNUMBER
C
- DATA INUMBER/000445/, ICOUNT/0/
+ DATA INUMBER/000446/, ICOUNT/0/
DATA CMESS/'* EMOSLIB version number = ****** *'/
C
C ------------------------------------------------------------------
diff --git a/share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake b/share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake
index c6947e8..e3ef29c 100644
--- a/share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake
+++ b/share/ecbuild/toolchains/ecmwf-XC30-Cray.cmake
@@ -35,7 +35,15 @@ set( OMPSTUBS_Fortran_FLAGS "-hnoomp" )
# LINK FLAGS
####################################################################
-set( ECBUILD_C_LINK_FLAGS "-Wl,-Map,loadmap -Wl,--as-needed -Wl,--eh-frame-hdr -Ktrap=fp" )
-set( ECBUILD_CXX_LINK_FLAGS "-Wl,-Map,loadmap -Wl,--as-needed -Wl,--eh-frame-hdr -Ktrap=fp" )
-set( ECBUILD_Fortran_LINK_FLAGS "-Wl,-Map,loadmap -Wl,--as-needed -Wl,--eh-frame-hdr -Ktrap=fp" )
+set( ECBUILD_SHARED_LINKER_FLAGS "-Wl,--eh-frame-hdr -Ktrap=fp" )
+set( ECBUILD_MODULE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Ktrap=fp -Wl,-Map,loadmap" )
+set( ECBUILD_EXE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Ktrap=fp -Wl,-Map,loadmap -Wl,--as-needed" )
set( ECBUILD_CXX_IMPLICIT_LINK_LIBRARIES "$ENV{CC_X86_64}/lib/x86-64/libcray-c++-rts.so" CACHE STRING "" )
+
+####################################################################
+# LIBRARIES
+####################################################################
+
+# Don't search for LAPACK as it is provided by the cray-libsci module which is
+# loaded by default
+set( LAPACK_FOUND $ENV{CRAY_LIBSCI_PREFIX_DIR} )
diff --git a/share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake b/share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake
index 3ea294f..84dbd7b 100644
--- a/share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake
+++ b/share/ecbuild/toolchains/ecmwf-XC30-GNU.cmake
@@ -39,6 +39,14 @@ set( ECBUILD_Fortran_FLAGS_DEBUG "-ffree-line-length-none -O0 -g -fcheck=bounds
# LINK FLAGS
####################################################################
-set( ECBUILD_C_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed -Wl,--eh-frame-hdr" )
-set( ECBUILD_CXX_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed -Wl,--eh-frame-hdr" )
-set( ECBUILD_Fortran_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed -Wl,--eh-frame-hdr" )
+set( ECBUILD_SHARED_LINKER_FLAGS "-Wl,--eh-frame-hdr" )
+set( ECBUILD_MODULE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Wl,-Map,loadmap" )
+set( ECBUILD_EXE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Wl,-Map,loadmap -Wl,--as-needed" )
+
+####################################################################
+# LIBRARIES
+####################################################################
+
+# Don't search for LAPACK as it is provided by the cray-libsci module which is
+# loaded by default
+set( LAPACK_FOUND $ENV{CRAY_LIBSCI_PREFIX_DIR} )
diff --git a/share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake b/share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake
index d5fdb32..a890886 100644
--- a/share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake
+++ b/share/ecbuild/toolchains/ecmwf-XC30-Intel.cmake
@@ -60,6 +60,14 @@ set( ECBUILD_Fortran_FLAGS_DEBUG "-O0 -g -traceback -warn all -heap-arrays -fpe
# LINK FLAGS
####################################################################
-set( ECBUILD_C_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed -Wl,--eh-frame-hdr" )
-set( ECBUILD_CXX_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed -Wl,--eh-frame-hdr" )
-set( ECBUILD_Fortran_LINK_FLAGS "-Wl,-Map,load.map -Wl,--as-needed -Wl,--eh-frame-hdr" )
+set( ECBUILD_SHARED_LINKER_FLAGS "-Wl,--eh-frame-hdr" )
+set( ECBUILD_MODULE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Wl,-Map,loadmap" )
+set( ECBUILD_EXE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Wl,-Map,loadmap -Wl,--as-needed" )
+
+####################################################################
+# LIBRARIES
+####################################################################
+
+# Don't search for LAPACK as it is provided by the cray-libsci module which is
+# loaded by default
+set( LAPACK_FOUND $ENV{CRAY_LIBSCI_PREFIX_DIR} )
diff --git a/tests/bufr/regress/download_tests_bufr_src_files.txt b/tests/bufr/regress/download_tests_bufr_src_files.txt
index e9e61ce..5f7d15c 100644
--- a/tests/bufr/regress/download_tests_bufr_src_files.txt
+++ b/tests/bufr/regress/download_tests_bufr_src_files.txt
@@ -102,6 +102,7 @@ rado_250.bufr
s4kn_165.bufr
sb19_206.bufr
sbu8_206.bufr
+sentinel1.bufr
ship_11.bufr
ship_12.bufr
ship_13.bufr
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/emos.git
More information about the debian-science-commits
mailing list