From b6f098eb6fce37899771cd94b2439204e20ddf49 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 1 Feb 2018 16:07:40 +0000 Subject: [PATCH] Fix usage of EC_HAVE_FORTRAN --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cfa35884..fbc103b7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,7 @@ ecbuild_add_option( FEATURE FORTRAN # TODO Remove this after REQUIRED_LANGUAGES if( ENABLE_FORTRAN ) # will set EC_HAVE_FORTRAN with the result + set( EC_HAVE_FORTRAN 0 ) ecbuild_enable_fortran( MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/fortran/modules ) set( HAVE_FORTRAN ${EC_HAVE_FORTRAN} ) else() @@ -340,7 +341,7 @@ add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) # temporary -- add support for ecbuild 1.0.x sub-project inclusion # to remove once mars server & client use eckit & ecbuild >= 1.1 -if( EC_HAVE_FORTRAN ) +if( HAVE_FORTRAN ) list( APPEND ECCODES_INCLUDE_DIRS ${CMAKE_Fortran_MODULE_DIRECTORY} ) list( APPEND ECCODES_LIBRARIES eccodes_f90 ) endif() @@ -368,7 +369,7 @@ ecbuild_pkgconfig( HAVE_ECCODES_THREADS HAVE_ECCODES_OMP_THREADS HAVE_NETCDF HAVE_PYTHON HAVE_FORTRAN HAVE_PNG HAVE_AEC ) -if( EC_HAVE_FORTRAN ) +if( HAVE_FORTRAN ) ecbuild_pkgconfig( NAME eccodes_f90 URL "https://software.ecmwf.int/wiki/display/ECC/"