Browse Source

generate fortran_version.h via optional VERSION_FLAG in compilers' files

master
Knut 10 years ago
parent
commit
5d9e4f1a6f
  1. 3
      Makefile
  2. 1
      compilers/compiler.GFORTRAN
  3. 1
      compilers/compiler.IFORT

3
Makefile

@ -59,6 +59,7 @@ VER=2.4.0
# 2013/04/01 - new devel release
VER=2.5.0
include compilers/compiler.$(FORTRAN_COMPILER)
.PHONY: doc
@ -72,7 +73,7 @@ VERSION: Makefile src/Makefile src/Rules.make
@mv -f .ver include/version.h
FORTRAN:
. ./fortran_version.sh > ./include/fortran_version.h
@echo "#define FORTRAN_VERSION \"`$(FC) $(VERSION_FLAG) 2> /dev/null`\"" > ./include/fortran_version.h
GIT:
@echo "#define GIT_REVISION \"`git log | head -1`\"" > ./include/git_revision.h

1
compilers/compiler.GFORTRAN

@ -9,5 +9,6 @@ EXTRAS = -ffree-form -ffree-line-length-none -Wall -std=f2003 -pedantic
DEBUG_FLAGS = -g
PROF_FLAGS = -p
PROD_FLAGS = -O3
VERSION_FLAG = --version | head -1
DEFINES += -DREAL_4B=real\(4\)
endif

1
compilers/compiler.IFORT

@ -11,5 +11,6 @@ DEBUG_FLAGS = -g -C -check -fpe0 -traceback -mp1
PROF_FLAGS = -p -O2 -mp1
PROD_FLAGS = -O3 -i-static -mp1
OMP_FLAGS = -openmp -openmp-link static -openmp-threadprivate legacy
VERSION_FLAG = --version | head -1
DEFINES += -DREAL_4B=real\(kind=4\)
endif

Loading…
Cancel
Save