ECC-1189: CMake: Rename option GRIB_TIMER to ECCODES_TIMER

This commit is contained in:
Shahram Najm 2021-01-06 17:49:43 +00:00
parent 0b68887b72
commit ae19339660
14 changed files with 20 additions and 20 deletions

View File

@ -181,7 +181,7 @@ ecbuild_add_option( FEATURE INSTALL_ECCODES_SAMPLES
ecbuild_add_option( FEATURE MEMORY_MANAGEMENT DESCRIPTION "Enable memory management" DEFAULT OFF ADVANCED ) ecbuild_add_option( FEATURE MEMORY_MANAGEMENT DESCRIPTION "Enable memory management" DEFAULT OFF ADVANCED )
ecbuild_add_option( FEATURE ALIGN_MEMORY DESCRIPTION "Enable memory alignment" DEFAULT OFF ADVANCED ) ecbuild_add_option( FEATURE ALIGN_MEMORY DESCRIPTION "Enable memory alignment" DEFAULT OFF ADVANCED )
ecbuild_add_option( FEATURE GRIB_TIMER DESCRIPTION "Enable timer" DEFAULT OFF ADVANCED ) ecbuild_add_option( FEATURE ECCODES_TIMER DESCRIPTION "Enable timer" DEFAULT OFF ADVANCED )
ecbuild_add_option( FEATURE ECCODES_THREADS DESCRIPTION "Enable POSIX threads" DEFAULT OFF ADVANCED ) ecbuild_add_option( FEATURE ECCODES_THREADS DESCRIPTION "Enable POSIX threads" DEFAULT OFF ADVANCED )
ecbuild_add_option( FEATURE ECCODES_OMP_THREADS DESCRIPTION "Enable OMP threads" DEFAULT OFF ADVANCED ) ecbuild_add_option( FEATURE ECCODES_OMP_THREADS DESCRIPTION "Enable OMP threads" DEFAULT OFF ADVANCED )
ecbuild_add_option( FEATURE EXTRA_TESTS DESCRIPTION "Enable extended regression testing" DEFAULT OFF ADVANCED ) ecbuild_add_option( FEATURE EXTRA_TESTS DESCRIPTION "Enable extended regression testing" DEFAULT OFF ADVANCED )
@ -240,10 +240,10 @@ endif()
############################################################################### ###############################################################################
# other options # other options
if( HAVE_GRIB_TIMER ) if( HAVE_ECCODES_TIMER )
set( GRIB_TIMER 1 ) set( ECCODES_TIMER 1 )
else() else()
set( GRIB_TIMER 0 ) set( ECCODES_TIMER 0 )
endif() endif()
set( IS_BIG_ENDIAN 0 ) set( IS_BIG_ENDIAN 0 )

View File

@ -332,9 +332,9 @@ AC_ARG_ENABLE([timer],
[AS_HELP_STRING([--enable-timer],[enable timer [by default disabled]])], [AS_HELP_STRING([--enable-timer],[enable timer [by default disabled]])],
[with_timer=${enableval}], [with_timer=no]) [with_timer=${enableval}], [with_timer=no])
if test "x${with_timer}" = xyes; then if test "x${with_timer}" = xyes; then
AC_DEFINE(GRIB_TIMER,1,1->Timer on 0->Timer off) AC_DEFINE(ECCODES_TIMER,1,1->Timer on 0->Timer off)
else else
AC_DEFINE(GRIB_TIMER,0,1->Timer on 0->Timer off) AC_DEFINE(ECCODES_TIMER,0,1->Timer on 0->Timer off)
fi fi

View File

@ -36,7 +36,7 @@
#define ECCODES_SAMPLES_PATH "@ECCODES_SAMPLES_PATH@" #define ECCODES_SAMPLES_PATH "@ECCODES_SAMPLES_PATH@"
#define GRIB_TIMER @GRIB_TIMER@ #define ECCODES_TIMER @ECCODES_TIMER@
/* headers */ /* headers */

View File

@ -1541,7 +1541,7 @@ struct grib_smart_table
}; };
#if GRIB_TIMER #if ECCODES_TIMER
typedef struct grib_timer typedef struct grib_timer
{ {
struct timeval start_; struct timeval start_;

View File

@ -10,7 +10,7 @@
#include "grib_api_internal.h" #include "grib_api_internal.h"
#if GRIB_TIMER #if ECCODES_TIMER
#ifndef ECCODES_ON_WINDOWS #ifndef ECCODES_ON_WINDOWS
#include <sys/time.h> #include <sys/time.h>

View File

@ -351,10 +351,10 @@ if( HAVE_BUILD_TOOLS )
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bufr_split_by_rdbSubtype.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bufr_split_by_rdbSubtype.sh
TEST_DEPENDS eccodes_download_bufrs ) TEST_DEPENDS eccodes_download_bufrs )
# Performance test. Must have -DENABLE_GRIB_TIMER=ON # Performance test. Must have -DENABLE_ECCODES_TIMER=ON
ecbuild_add_test( TARGET eccodes_t_grib_ecc-386 ecbuild_add_test( TARGET eccodes_t_grib_ecc-386
TYPE SCRIPT TYPE SCRIPT
CONDITION ENABLE_EXTRA_TESTS AND ENABLE_GRIB_TIMER CONDITION ENABLE_EXTRA_TESTS AND ENABLE_ECCODES_TIMER
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_ecc-386.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_ecc-386.sh
TEST_DEPENDS eccodes_download_gribs ) TEST_DEPENDS eccodes_download_gribs )
else() else()

View File

@ -10,7 +10,7 @@
#include "grib_api_internal.h" #include "grib_api_internal.h"
#if GRIB_TIMER #if ECCODES_TIMER
void usage(char* prog) void usage(char* prog)
{ {

View File

@ -21,7 +21,7 @@ static void usage(const char* prog)
exit(1); exit(1);
} }
#ifdef GRIB_TIMER #ifdef ECCODES_TIMER
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
grib_timer* tes = grib_get_timer(0, "decoding", 0, 0); grib_timer* tes = grib_get_timer(0, "decoding", 0, 0);
@ -31,7 +31,7 @@ int main(int argc, char** argv)
size_t values_len = 0; size_t values_len = 0;
double* values = NULL; double* values = NULL;
double duration_actual = 0; double duration_actual = 0;
const double duration_max = 3; /* seconds */ const double duration_max = 3.6; /* seconds */
const int num_repetitions = 1000; const int num_repetitions = 1000;
if (argc < 2) usage(argv[0]); if (argc < 2) usage(argv[0]);

View File

@ -17,7 +17,7 @@
#define BUFF_SIZE 50000000 #define BUFF_SIZE 50000000
#ifdef HAVE_LIBEMOS #ifdef HAVE_LIBEMOS
#if GRIB_TIMER #if ECCODES_TIMER
#define TEST_OK #define TEST_OK
#endif #endif
#endif #endif

View File

@ -10,7 +10,7 @@
#include "grib_api_internal.h" #include "grib_api_internal.h"
#if GRIB_TIMER #if ECCODES_TIMER
void usage(char* prog) void usage(char* prog)
{ {

View File

@ -17,7 +17,7 @@
#define BUFF_SIZE 50000000 #define BUFF_SIZE 50000000
#ifdef HAVE_LIBEMOS #ifdef HAVE_LIBEMOS
#if GRIB_TIMER #if ECCODES_TIMER
#define TEST_OK #define TEST_OK
#endif #endif
#endif #endif

View File

@ -10,7 +10,7 @@
#include "grib_api_internal.h" #include "grib_api_internal.h"
#if GRIB_TIMER #if ECCODES_TIMER
void usage(char* prog) void usage(char* prog)
{ {

View File

@ -17,7 +17,7 @@
#define BUFF_SIZE 10000000 #define BUFF_SIZE 10000000
#ifdef HAVE_LIBEMOS #ifdef HAVE_LIBEMOS
#if GRIB_TIMER #if ECCODES_TIMER
#define TEST_OK #define TEST_OK
#endif #endif
#endif #endif

View File

@ -16,7 +16,7 @@
#define NUMBER(a) (sizeof(a)/sizeof(a[0])) #define NUMBER(a) (sizeof(a)/sizeof(a[0]))
#ifdef HAVE_LIBEMOS #ifdef HAVE_LIBEMOS
#if GRIB_TIMER #if ECCODES_TIMER
extern void grsrnd_(flong*); extern void grsrnd_(flong*);
extern void gribex_(flong*, flong*, flong*, double*, flong*, double*, flong*, double*, extern void gribex_(flong*, flong*, flong*, double*, flong*, double*, flong*, double*,