From 1aeaeecef7fb96a96ea38f299f06184cbb2c2b30 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 18 Feb 2015 10:14:22 +0000 Subject: [PATCH] Rebranding from grib_api to eccodes --- CMakeLists.txt | 44 ++++++++++++++++++++++---------------------- grib_api_config.h.in | 10 +++++----- src/CMakeLists.txt | 2 +- tigge/CMakeLists.txt | 8 ++++---- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 780404ea1..3acf82c1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,11 +8,11 @@ cmake_minimum_required( VERSION 2.8.4 FATAL_ERROR ) -project( grib_api C ) +project( eccodes C ) set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild/cmake") -set( GRIB_API_INSTALL_INCLUDE_DIR include CACHE PATH "GRIB_API override installation directory for header files") +set( ECCODES_INSTALL_INCLUDE_DIR include CACHE PATH "ecCodes override installation directory for header files") include( ecbuild_system ) @@ -57,12 +57,12 @@ ecbuild_add_option( FEATURE AEC ) ecbuild_add_option( FEATURE PYTHON - DESCRIPTION "build the GRIB_API Python interface" + DESCRIPTION "build the ecCodes Python interface" DEFAULT ON ) ecbuild_add_option( FEATURE FORTRAN - DESCRIPTION "build the GRIB_API Fortran interface" + DESCRIPTION "build the ecCodes Fortran interface" DEFAULT ON ) @@ -83,9 +83,9 @@ ecbuild_add_option( FEATURE GRIB_THREADS DESCRIPTION "enable threads" DEFAUL ############################################################################### # macro processing -set( GRIB_API_EXTRA_LIBRARIES "" ) -set( GRIB_API_EXTRA_INCLUDE_DIRS "" ) -set( GRIB_API_EXTRA_DEFINITIONS "" ) +set( ECCODES_EXTRA_LIBRARIES "" ) +set( ECCODES_EXTRA_INCLUDE_DIRS "" ) +set( ECCODES_EXTRA_DEFINITIONS "" ) find_package( CMath ) @@ -184,13 +184,13 @@ else() endif() if( NOT DEFINED ECCODES_DEFINITION_PATH ) - set( ECCODES_DEFINITION_PATH ${grib_api_default_data_prefix}/share/grib_api/definitions ) + set( ECCODES_DEFINITION_PATH ${grib_api_default_data_prefix}/share/eccodes/definitions ) endif() if( NOT DEFINED ECCODES_SAMPLES_PATH ) - set( ECCODES_SAMPLES_PATH ${grib_api_default_data_prefix}/share/grib_api/samples ) + set( ECCODES_SAMPLES_PATH ${grib_api_default_data_prefix}/share/eccodes/samples ) endif() if( NOT DEFINED ECCODES_IFS_SAMPLES_PATH ) - set( ECCODES_IFS_SAMPLES_PATH ${grib_api_default_data_prefix}/share/grib_api/ifs_samples ) + set( ECCODES_IFS_SAMPLES_PATH ${grib_api_default_data_prefix}/share/eccodes/ifs_samples ) endif() ### config header @@ -212,24 +212,24 @@ endif() ### export package to other ecbuild packages -set( GRIB_API_TPLS AEC PNG Jasper OpenJPEG CMath ) -set( GRIB_API_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src ) -set( GRIB_API_LIBRARIES eccodes ) +set( ECCODES_TPLS AEC PNG Jasper OpenJPEG CMath ) +set( ECCODES_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src ) +set( ECCODES_LIBRARIES eccodes ) get_directory_property( COMPILE_DEFINITIONS ECCODES_DEFINITIONS ) -foreach( _tpl ${GRIB_API_TPLS} ) +foreach( _tpl ${ECCODES_TPLS} ) string( TOUPPER ${_tpl} TPL ) if( ${TPL}_FOUND ) - list( APPEND GRIB_API_EXTRA_DEFINITIONS ${${TPL}_DEFINITIONS} ) - list( APPEND GRIB_API_EXTRA_INCLUDE_DIRS ${${TPL}_INCLUDE_DIRS} ${${TPL}_INCLUDE_DIR} ) - list( APPEND GRIB_API_EXTRA_LIBRARIES ${${TPL}_LIBRARIES} ) + list( APPEND ECCODES_EXTRA_DEFINITIONS ${${TPL}_DEFINITIONS} ) + list( APPEND ECCODES_EXTRA_INCLUDE_DIRS ${${TPL}_INCLUDE_DIRS} ${${TPL}_INCLUDE_DIR} ) + list( APPEND ECCODES_EXTRA_LIBRARIES ${${TPL}_LIBRARIES} ) endif() endforeach() ### include directories -include_directories( ${GRIB_API_INCLUDE_DIRS} ${GRIB_API_EXTRA_INCLUDE_DIRS} ) +include_directories( ${ECCODES_INCLUDE_DIRS} ${ECCODES_EXTRA_INCLUDE_DIRS} ) add_subdirectory( src ) add_subdirectory( tools ) @@ -262,14 +262,14 @@ add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) # to remove once mars server & client use eckit & ecbuild >= 1.1 if( EC_HAVE_FORTRAN ) - list( APPEND GRIB_API_INCLUDE_DIRS ${CMAKE_Fortran_MODULE_DIRECTORY} ) - list( APPEND GRIB_API_LIBRARIES eccodes_f77 eccodes_f90 ) + list( APPEND ECCODES_INCLUDE_DIRS ${CMAKE_Fortran_MODULE_DIRECTORY} ) + list( APPEND ECCODES_LIBRARIES eccodes_f77 eccodes_f90 ) endif() if( NOT PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME ) set( ECCODES_DEFINITIONS ${ECCODES_DEFINITIONS} PARENT_SCOPE )# includes already TPL definitions - set( GRIB_API_INCLUDE_DIRS ${GRIB_API_INCLUDE_DIRS} ${GRIB_API_EXTRA_INCLUDE_DIRS} PARENT_SCOPE ) - set( GRIB_API_LIBRARIES ${GRIB_API_LIBRARIES} ${GRIB_API_EXTRA_LIBRARIES} ${CMATH_LIBRARIES} PARENT_SCOPE ) + set( ECCODES_INCLUDE_DIRS ${ECCODES_INCLUDE_DIRS} ${ECCODES_EXTRA_INCLUDE_DIRS} PARENT_SCOPE ) + set( ECCODES_LIBRARIES ${ECCODES_LIBRARIES} ${ECCODES_EXTRA_LIBRARIES} ${CMATH_LIBRARIES} PARENT_SCOPE ) set( ECCODES_FOUND TRUE PARENT_SCOPE ) set( ECCODES_SAMPLES_PATH ${ECCODES_SAMPLES_PATH} PARENT_SCOPE ) set( ECCODES_IFS_SAMPLES_PATH ${ECCODES_IFS_SAMPLES_PATH} PARENT_SCOPE ) diff --git a/grib_api_config.h.in b/grib_api_config.h.in index ee4967c96..15bc4a1a5 100644 --- a/grib_api_config.h.in +++ b/grib_api_config.h.in @@ -11,15 +11,15 @@ #ifndef grib_api_config_h #define grib_api_config_h -#include "grib_api_ecbuild_config.h" /* generated by ecbuild */ +#include "eccodes_ecbuild_config.h" /* generated by ecbuild */ -#define GRIB_API_VERSION_STR "@GRIB_API_VERSION_STR@" +#define GRIB_API_VERSION_STR "@ECCODES_VERSION_STR@" /* GRIB_API_VERSION is defined in grib_api.h from the 3 version components below */ -#define GRIB_API_MAJOR_VERSION @GRIB_API_MAJOR_VERSION@ -#define GRIB_API_MINOR_VERSION @GRIB_API_MINOR_VERSION@ -#define GRIB_API_REVISION_VERSION @GRIB_API_PATCH_VERSION@ +#define GRIB_API_MAJOR_VERSION @ECCODES_MAJOR_VERSION@ +#define GRIB_API_MINOR_VERSION @ECCODES_MINOR_VERSION@ +#define GRIB_API_REVISION_VERSION @ECCODES_PATCH_VERSION@ #define ECCODES_DEFINITION_PATH "@ECCODES_DEFINITION_PATH@" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a007e6a65..5d34ed7b4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -381,7 +381,7 @@ ecbuild_add_library(TARGET eccodes griby.c gribl.c ${grib_api_srcs} GENERATED grib_api_version.c - LIBS ${GRIB_API_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} + LIBS ${ECCODES_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} TEMPLATES ${grib_api_extra_srcs} ${CMATH_LIBRARIES} ) diff --git a/tigge/CMakeLists.txt b/tigge/CMakeLists.txt index 23ab9859a..3281ebb64 100644 --- a/tigge/CMakeLists.txt +++ b/tigge/CMakeLists.txt @@ -1,25 +1,25 @@ # tigge ecbuild_add_executable(TARGET tigge_check SOURCES tigge_check.c - INCLUDES ${GRIB_API_EXTRA_INCLUDE_DIRS} + INCLUDES ${ECCODES_EXTRA_INCLUDE_DIRS} LIBS eccodes ) ecbuild_add_executable(TARGET tigge_name SOURCES tigge_name.c - INCLUDES ${GRIB_API_EXTRA_INCLUDE_DIRS} + INCLUDES ${ECCODES_EXTRA_INCLUDE_DIRS} LIBS eccodes ) ecbuild_add_executable(TARGET tigge_accumulations SOURCES tigge_accumulations.c - INCLUDES ${GRIB_API_EXTRA_INCLUDE_DIRS} + INCLUDES ${ECCODES_EXTRA_INCLUDE_DIRS} LIBS eccodes ) ecbuild_add_executable(TARGET tigge_split SOURCES tigge_split.c - INCLUDES ${GRIB_API_EXTRA_INCLUDE_DIRS} + INCLUDES ${ECCODES_EXTRA_INCLUDE_DIRS} LIBS eccodes )