Work on memfs

This commit is contained in:
Baudouin Raoult 2016-06-18 17:10:19 +01:00
parent 61844f413b
commit dc378c3fdb
3 changed files with 9 additions and 2 deletions

View File

@ -12,7 +12,7 @@ set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/memfs.c PROPERTIES OBJE
# "${PROJECT_SOURCE_DIR}/memfs.py" ${definition_files}" # "${PROJECT_SOURCE_DIR}/memfs.py" ${definition_files}"
) )
ecbuild_add_library(TARGET grib_api_memfs ecbuild_add_library(TARGET eccodes_memfs
CONDITION HAVE_MEMFS CONDITION HAVE_MEMFS
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/memfs.c SOURCES ${CMAKE_CURRENT_BINARY_DIR}/memfs.c
GENERATED ${CMAKE_CURRENT_BINARY_DIR}/memfs.c ) GENERATED ${CMAKE_CURRENT_BINARY_DIR}/memfs.c )

View File

@ -401,7 +401,7 @@ configure_file( eccodes_version.h.in eccodes_version.h @ONLY )
# DEPENDANT action.c ) # DEPENDANT action.c )
if(HAVE_MEMFS) if(HAVE_MEMFS)
list(APPEND ECCODES_EXTRA_LIBRARIES grib_api_memfs) list(APPEND ECCODES_EXTRA_LIBRARIES eccodes_memfs)
endif() endif()

View File

@ -416,6 +416,13 @@ grib_context* grib_context_get_default()
default_grib_context.log_stream=stdout; default_grib_context.log_stream=stdout;
} }
#ifdef HAVE_MEMFS
if(!default_grib_context.grib_samples_path)
default_grib_context.grib_samples_path = "<memfs>";
if(!default_grib_context.grib_definition_files_path)
default_grib_context.grib_definition_files_path = "<memfs>";
#endif
#ifdef ECCODES_SAMPLES_PATH #ifdef ECCODES_SAMPLES_PATH
if(!default_grib_context.grib_samples_path) if(!default_grib_context.grib_samples_path)
default_grib_context.grib_samples_path = ECCODES_SAMPLES_PATH ; default_grib_context.grib_samples_path = ECCODES_SAMPLES_PATH ;