Make dolfin version available for comparison in preprocessor
The macro DOLFIN_VERSION is today defined as a string, which isn't possible to use for comparisons in the preprocessor.
Is there a reason for this, or would it be possible to add definitions like this:
DOLFIN_VERSION_MAJOR DOLFIN_VERSION_MINOR DOLFIN_VERSION_MICRO DOLFIN_VERSION_STABLE
This way, it would be possible to check dolfin version in the preprocessor, and easily keep minor extensions compatible with several versions of dolfin.
Comments (7)
-
reporter -
Would be handy. We could put it in a file
dolfin/common/version.h
. Needs a little bit of CMake code to write the file. -
We have this for UFC (now part of FFC and versioning handled via setup.py), but it was handled in the past in UFC via CMake so it would be relatively easy to copy what we did then.
-
-
assigned issue to
-
assigned issue to
-
I have made an attempt to fix this in pull request #195. Please take a look.
-
- changed status to resolved
Fixed in 40bce06.
-
- removed milestone
Removing milestone: 1.5 (automated comment)
- Log in to comment
Btw, this issue has also been encountered by someone else..