mirror of https://github.com/ecmwf/eccodes.git
GRIB-579 - not having fortran does not stop you building grib_api
This commit is contained in:
parent
dad43b45f5
commit
3c6792e2c1
|
@ -37,7 +37,8 @@ option( ENABLE_PYTHON "try to build the GRIB_API Python interface" ON )
|
||||||
option( ENABLE_FORTRAN "try to build the GRIB_API Fortran interface" ON )
|
option( ENABLE_FORTRAN "try to build the GRIB_API Fortran interface" ON )
|
||||||
|
|
||||||
if( ENABLE_FORTRAN )
|
if( ENABLE_FORTRAN )
|
||||||
ecbuild_enable_fortran( REQUIRED MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/fortran/modules )
|
# will set EC_HAVE_FORTRAN with the result
|
||||||
|
ecbuild_enable_fortran( MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/fortran/modules )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option( ENABLE_MEMORY_MANAGEMENT "enable memory management" OFF )
|
option( ENABLE_MEMORY_MANAGEMENT "enable memory management" OFF )
|
||||||
|
|
|
@ -38,7 +38,7 @@ list( APPEND tests
|
||||||
# SOURCES samples.f90
|
# SOURCES samples.f90
|
||||||
# LIBS grib_api_f90 grib_api
|
# LIBS grib_api_f90 grib_api
|
||||||
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/samples.sh
|
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/samples.sh
|
||||||
# CONDITION ENABLE_FORTRAN
|
# CONDITION EC_HAVE_FORTRAN
|
||||||
# )
|
# )
|
||||||
|
|
||||||
foreach( tool ${tests} )
|
foreach( tool ${tests} )
|
||||||
|
@ -47,7 +47,7 @@ foreach( tool ${tests} )
|
||||||
ecbuild_add_executable( TARGET f_${tool}
|
ecbuild_add_executable( TARGET f_${tool}
|
||||||
NOINSTALL
|
NOINSTALL
|
||||||
SOURCES ${tool}.f90
|
SOURCES ${tool}.f90
|
||||||
CONDITION ENABLE_FORTRAN
|
CONDITION EC_HAVE_FORTRAN
|
||||||
LINKER_LANGUAGE Fortran
|
LINKER_LANGUAGE Fortran
|
||||||
LIBS grib_api_f90 grib_api
|
LIBS grib_api_f90 grib_api
|
||||||
)
|
)
|
||||||
|
@ -55,7 +55,7 @@ foreach( tool ${tests} )
|
||||||
ecbuild_add_test( TARGET f_${tool}_test
|
ecbuild_add_test( TARGET f_${tool}_test
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
DEPENDS f_${tool}
|
DEPENDS f_${tool}
|
||||||
CONDITION ENABLE_FORTRAN
|
CONDITION EC_HAVE_FORTRAN
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
||||||
RESOURCES include.sh
|
RESOURCES include.sh
|
||||||
)
|
)
|
||||||
|
@ -66,21 +66,21 @@ endforeach()
|
||||||
ecbuild_add_executable( TARGET f_new_from_file
|
ecbuild_add_executable( TARGET f_new_from_file
|
||||||
NOINSTALL
|
NOINSTALL
|
||||||
SOURCES new_from_file.f90
|
SOURCES new_from_file.f90
|
||||||
CONDITION ENABLE_FORTRAN
|
CONDITION EC_HAVE_FORTRAN
|
||||||
LINKER_LANGUAGE Fortran
|
LINKER_LANGUAGE Fortran
|
||||||
LIBS grib_api_f90 grib_api
|
LIBS grib_api_f90 grib_api
|
||||||
)
|
)
|
||||||
ecbuild_add_executable( TARGET f_copy_namespace
|
ecbuild_add_executable( TARGET f_copy_namespace
|
||||||
NOINSTALL
|
NOINSTALL
|
||||||
SOURCES copy_namespace.f90
|
SOURCES copy_namespace.f90
|
||||||
CONDITION ENABLE_FORTRAN
|
CONDITION EC_HAVE_FORTRAN
|
||||||
LINKER_LANGUAGE Fortran
|
LINKER_LANGUAGE Fortran
|
||||||
LIBS grib_api_f90 grib_api
|
LIBS grib_api_f90 grib_api
|
||||||
)
|
)
|
||||||
ecbuild_add_executable( TARGET f_set_gvc
|
ecbuild_add_executable( TARGET f_set_gvc
|
||||||
NOINSTALL
|
NOINSTALL
|
||||||
SOURCES set_gvc.f90
|
SOURCES set_gvc.f90
|
||||||
CONDITION ENABLE_FORTRAN
|
CONDITION EC_HAVE_FORTRAN
|
||||||
LINKER_LANGUAGE Fortran
|
LINKER_LANGUAGE Fortran
|
||||||
LIBS grib_api_f90 grib_api
|
LIBS grib_api_f90 grib_api
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
if( ENABLE_FORTRAN )
|
if( EC_HAVE_FORTRAN )
|
||||||
|
|
||||||
set( srcdir ${CMAKE_CURRENT_SOURCE_DIR} )
|
set( srcdir ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||||
set( bindir ${CMAKE_CURRENT_BINARY_DIR} )
|
set( bindir ${CMAKE_CURRENT_BINARY_DIR} )
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
TESTS = definitions.sh \
|
TESTS = definitions.sh \
|
||||||
bufrdc_ref.sh bufr_dump.sh \
|
\
|
||||||
ieee.sh grib1to2.sh \
|
ieee.sh grib1to2.sh \
|
||||||
unit_tests.sh \
|
unit_tests.sh \
|
||||||
grib2to1.sh badgrib.sh ls.sh filter.sh \
|
grib2to1.sh badgrib.sh ls.sh filter.sh \
|
||||||
|
|
Loading…
Reference in New Issue