Skip to content
Snippets Groups Projects
Commit 1b55666e authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: distinguish OpenFOAM version for user-coding (fixes #195)

The pre-processor macro 'OPENFOAM_PLUS' is defined with a numerical
value equal to the currently compatible version number.

This can be used judiciously within user coding to help with minor
differences between OpenFOAM versions. For example,

    #ifdef OPENFOAM_PLUS
        #if (OPENFOAM_PLUS >= 1612)
        ...
        #endif
    #endif

or simply

    #if (OPENFOAM_PLUS >= 1612)
    ...
    #endif
parent bac94fc5
No related branches found
No related tags found
No related merge requests found
#-------------------------------*- makefile -*--------------------------------- #-------------------------------*- makefile -*---------------------------------
WM_VERSION = OPENFOAM_PLUS=1606
AR = ar AR = ar
ARFLAGS = cr ARFLAGS = cr
...@@ -6,7 +7,7 @@ RANLIB = ranlib ...@@ -6,7 +7,7 @@ RANLIB = ranlib
CPP = cpp CPP = cpp
LD = ld LD = ld
GFLAGS = -D$(WM_ARCH) -DWM_ARCH_OPTION=$(WM_ARCH_OPTION) \ GFLAGS = -D$(WM_VERSION) -D$(WM_ARCH) -DWM_ARCH_OPTION=$(WM_ARCH_OPTION) \
-DWM_$(WM_PRECISION_OPTION) -DWM_LABEL_SIZE=$(WM_LABEL_SIZE) -DWM_$(WM_PRECISION_OPTION) -DWM_LABEL_SIZE=$(WM_LABEL_SIZE)
GINC = GINC =
GLIBS = -lm GLIBS = -lm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment