From 1215707e2868e125b6dbbd0277e7a97b02d8ffd3 Mon Sep 17 00:00:00 2001 From: Edward Hartnett <38856240+edwardhartnett@users.noreply.github.com> Date: Fri, 29 Mar 2024 05:56:18 -0600 Subject: [PATCH] Add a VERSION file and get package version there (#97) * trying ip build * trying ip build * trying ip build * trying ip build * trying ip build * more ip work * added -DGFORTRAN to build, didn't work * got build to succeed! * reverted change * now use VERSION file for version --- CMakeLists.txt | 9 +++++++-- VERSION | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 VERSION diff --git a/CMakeLists.txt b/CMakeLists.txt index a6050536..8417db41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,15 @@ # This is the main CMake build file for the wgrib2 project. # # Kyle Gerheiser, Edward Hartnett, Wesley Ebisuzaki +cmake_minimum_required(VERSION 3.15) -cmake_minimum_required(VERSION 3.12) -project(wgrib2 VERSION 3.1.4 LANGUAGES Fortran C) +# Read the current version number from file VERSION. +file(STRINGS "VERSION" pVersion) +# Set up project with version number from VERSION file. +project(wgrib2 VERSION ${pVersion} LANGUAGES Fortran C) + +# Handle user build options. option(USE_NETCDF3 "Use NetCDF-3?" off) option(USE_NETCDF4 "Use NetCDF-4?" off) option(USE_HDF5 "Use HDF5?" off) diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..944880fa --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +3.2.0