diff --git a/src/icebergs.F90 b/src/icebergs.F90 index c720aa1..5715e7a 100644 --- a/src/icebergs.F90 +++ b/src/icebergs.F90 @@ -85,11 +85,11 @@ module ice_bergs real, parameter :: Cd_iv=0.9 !< (Vertical) Drag coefficient between bergs and sea-ice !TOM> no horizontal drag for sea ice! real, parameter :: Cd_ih=0.0012 !< (Horizontal) Drag coefficient between bergs and sea-ice -#ifdef _FILE_VERSION -character(len=128) :: version = _FILE_VERSION !< Version of file -#else -character(len=128) :: version = 'unknown' !< Version of file +#ifndef _FILE_VERSION +! Version of file provided can be set to git hash via a CPP macro but if not set we use 'unknown' +#define _FILE_VERSION 'unknown' #endif +character(len=128) :: version = _FILE_VERSION !< Version of file contains diff --git a/src/icebergs_framework.F90 b/src/icebergs_framework.F90 index 896c1fb..38859ad 100644 --- a/src/icebergs_framework.F90 +++ b/src/icebergs_framework.F90 @@ -619,12 +619,11 @@ module ice_bergs_framework !! \todo Remove when backward compatibility no longer needed logical :: orig_read=.false. -!> Version of file provided by CPP macro (usually set to git hash) -#ifdef _FILE_VERSION -character(len=128) :: version = _FILE_VERSION !< Version of file -#else -character(len=128) :: version = 'unknown' !< Version of file +#ifndef _FILE_VERSION +! Version of file provided can be set to git hash via a CPP macro but if not set we use 'unknown' +#define _FILE_VERSION 'unknown' #endif +character(len=128) :: version = _FILE_VERSION !< Version of file !> Set a value in the buffer at position (counter,n) after incrementing counter interface push_buffer_value diff --git a/src/icebergs_io.F90 b/src/icebergs_io.F90 index e9c4cd2..6ab8151 100644 --- a/src/icebergs_io.F90 +++ b/src/icebergs_io.F90 @@ -69,11 +69,11 @@ module ice_bergs_io integer :: clock_trw,clock_trp integer :: clock_btrw,clock_btrp !bond trajectories -#ifdef _FILE_VERSION - character(len=128) :: version = _FILE_VERSION -#else - character(len=128) :: version = 'unknown' +#ifndef _FILE_VERSION +! Version of file provided can be set to git hash via a CPP macro but if not set we use 'unknown' +#define _FILE_VERSION 'unknown' #endif +character(len=128) :: version = _FILE_VERSION !< Version of file contains