diff --git a/CMakeLists.txt b/CMakeLists.txt index 999991bf9..549971e2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index 1eed1e7ea..9efa1572c 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -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 ) diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index 00027c1d5..55f892862 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -if( ENABLE_FORTRAN ) +if( EC_HAVE_FORTRAN ) set( srcdir ${CMAKE_CURRENT_SOURCE_DIR} ) set( bindir ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/tests/Makefile.am b/tests/Makefile.am index e1f99a36b..c61ee9697 100755 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 \