SHA1 hash and other cleanups

This commit is contained in:
Shahram Najm 2013-06-25 10:52:05 +01:00
parent 1070ec6203
commit 021857c7c0
4 changed files with 15 additions and 2 deletions

View File

@ -1,7 +1,5 @@
if( GRIB_API_PYTHON )
message( WARNING "support for Python with CMake needs testing" )
ecbuild_find_python( VERSION 2.5 )
find_package( SWIG )

View File

@ -307,6 +307,8 @@ list( APPEND grib_api_srcs
# grib_bits_any_endian_simple.c
# )
configure_file( grib_api_version.c.in grib_api_version.c @ONLY )
ecbuild_generate_yy( YYPREFIX grib_yy
YACC griby
LEX gribl
@ -314,9 +316,12 @@ ecbuild_generate_yy( YYPREFIX grib_yy
ecbuild_add_library( TARGET grib_api
SOURCES
grib_api_version.c
griby.c gribl.c
${grib_api_extra_srcs}
${grib_api_srcs}
GENERATED
grib_api_version.c
INCLUDES
${GRIB_API_EXTRA_INCLUDE_DIRS}
LIBS

View File

@ -1215,6 +1215,13 @@ void grib_multi_support_reset_file(grib_context* c, FILE* f);
*/
long grib_get_api_version(void);
/**
* Get the Git version control SHA1 identifier
*
* @return character string with SHA1 identifier
*/
const char* grib_get_git_sha1(void);
/**
* Prints the API version
*

View File

@ -0,0 +1,3 @@
#include "grib_api_internal.h"
const char * grib_get_git_sha1() { return "@GRIB_API_GIT_SHA1@"; }