Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 416
    • Issues 416
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Merge requests
  • !56

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

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mark OLESEN requested to merge style-compile-def into develop Jul 26, 2016
  • Overview 0
  • Commits 1
  • Changes 1

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
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: style-compile-def