Add support for pre-release mode

This commit is contained in:
Shahram Najm 2019-03-26 12:02:57 +00:00
parent 656c1d38a9
commit 0479c91ba9
2 changed files with 8 additions and 6 deletions

View File

@ -246,11 +246,11 @@ void grib_print_api_version(FILE* out)
ECCODES_MAJOR_VERSION,
ECCODES_MINOR_VERSION,
ECCODES_REVISION_VERSION);
/*
* if (ECCODES_MAJOR_VERSION < 1) {
* fprintf(out, "%s", " PRE-RELEASE");
* }
*/
#ifdef ECCODES_PRE_RELEASE
if (ECCODES_MAJOR_VERSION < 1) {
fprintf(out, "%s", " PRE-RELEASE");
}
#endif
}
const char* grib_get_package_name()

View File

@ -65,7 +65,9 @@ int main( int argc,char* argv[])
printf("\n");
printf("%s Version %d.%d.%d",
grib_get_package_name(), major,minor,revision);
/* if (ECCODES_MAJOR_VERSION < 1) printf(" PRE-RELEASE"); */
#ifdef ECCODES_PRE_RELEASE
if (ECCODES_MAJOR_VERSION < 1) printf(" PRE-RELEASE");
#endif
printf("\n");
printf("\n");
if(context->debug) {