GRIB-579 - not having fortran does not stop you building grib_api

This commit is contained in:
Shahram Najm 2014-10-03 16:49:05 +01:00
parent dad43b45f5
commit 3c6792e2c1
4 changed files with 10 additions and 9 deletions

View File

@ -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 )
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()
option( ENABLE_MEMORY_MANAGEMENT "enable memory management" OFF )

View File

@ -38,7 +38,7 @@ list( APPEND tests
# SOURCES samples.f90
# LIBS grib_api_f90 grib_api
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/samples.sh
# CONDITION ENABLE_FORTRAN
# CONDITION EC_HAVE_FORTRAN
# )
foreach( tool ${tests} )
@ -47,7 +47,7 @@ foreach( tool ${tests} )
ecbuild_add_executable( TARGET f_${tool}
NOINSTALL
SOURCES ${tool}.f90
CONDITION ENABLE_FORTRAN
CONDITION EC_HAVE_FORTRAN
LINKER_LANGUAGE Fortran
LIBS grib_api_f90 grib_api
)
@ -55,7 +55,7 @@ foreach( tool ${tests} )
ecbuild_add_test( TARGET f_${tool}_test
TYPE SCRIPT
DEPENDS f_${tool}
CONDITION ENABLE_FORTRAN
CONDITION EC_HAVE_FORTRAN
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
RESOURCES include.sh
)
@ -66,21 +66,21 @@ endforeach()
ecbuild_add_executable( TARGET f_new_from_file
NOINSTALL
SOURCES new_from_file.f90
CONDITION ENABLE_FORTRAN
CONDITION EC_HAVE_FORTRAN
LINKER_LANGUAGE Fortran
LIBS grib_api_f90 grib_api
)
ecbuild_add_executable( TARGET f_copy_namespace
NOINSTALL
SOURCES copy_namespace.f90
CONDITION ENABLE_FORTRAN
CONDITION EC_HAVE_FORTRAN
LINKER_LANGUAGE Fortran
LIBS grib_api_f90 grib_api
)
ecbuild_add_executable( TARGET f_set_gvc
NOINSTALL
SOURCES set_gvc.f90
CONDITION ENABLE_FORTRAN
CONDITION EC_HAVE_FORTRAN
LINKER_LANGUAGE Fortran
LIBS grib_api_f90 grib_api
)

View File

@ -1,4 +1,4 @@
if( ENABLE_FORTRAN )
if( EC_HAVE_FORTRAN )
set( srcdir ${CMAKE_CURRENT_SOURCE_DIR} )
set( bindir ${CMAKE_CURRENT_BINARY_DIR} )

View File

@ -1,5 +1,5 @@
TESTS = definitions.sh \
bufrdc_ref.sh bufr_dump.sh \
\
ieee.sh grib1to2.sh \
unit_tests.sh \
grib2to1.sh badgrib.sh ls.sh filter.sh \