From 954640880a58978040a7f2f02aae3bb52e43a773 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:53:37 -0700 Subject: [PATCH] only require fortran if needed for make_ftn_api=ON --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07168a5..2c10345 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.15) file(STRINGS "VERSION" pVersion) # Set up project with version number from VERSION file. -project(wgrib2 VERSION ${pVersion} LANGUAGES Fortran C) +project(wgrib2 VERSION ${pVersion} LANGUAGES C) # Handle user build options. option(ENABLE_DOCS "Enable generation of doxygen-based documentation." OFF) @@ -39,6 +39,10 @@ option(BUILD_LIB "Build wgrib2 library?" on) option(BUILD_SHARED_LIB "Build shared library?" off) option(BUILD_WGRIB "Build wgrib code?" off) +if (MAKE_FTN_API OR USE_IPOLATES) + enable_language(Fortran) +endif() + # Developers can use this option to specify a local directory which # holds the test files. They will be copied instead of fetching the # files via FTP.