aboutsummaryrefslogtreecommitdiff
path: root/docs/source/development/reference
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-03-17 16:30:22 +0100
committerGitHub <noreply@github.com>2021-03-17 16:30:22 +0100
commit979e3a3ba0b270f7401a57105411375bb99ddbb5 (patch)
treee0acbd420c2a52a8aa8f563aaef88dded51edfaa /docs/source/development/reference
parentee19a2d4d3241f2d44968a67bf4a6e425e38d84a (diff)
parentb37d7a72ee322c19e881728fc1e1ba25635b1c4a (diff)
downloadPROJ-979e3a3ba0b270f7401a57105411375bb99ddbb5.tar.gz
PROJ-979e3a3ba0b270f7401a57105411375bb99ddbb5.zip
Merge pull request #2581 from rouault/proj_version_number
proj.h: add PROJ_COMPUTE_VERSION, PROJ_VERSION_NUMBER, PROJ_AT_LEAST_VERSION macros
Diffstat (limited to 'docs/source/development/reference')
-rw-r--r--docs/source/development/reference/index.rst1
-rw-r--r--docs/source/development/reference/macros.rst39
2 files changed, 40 insertions, 0 deletions
diff --git a/docs/source/development/reference/index.rst b/docs/source/development/reference/index.rst
index caa893c3..f04f4b3e 100644
--- a/docs/source/development/reference/index.rst
+++ b/docs/source/development/reference/index.rst
@@ -7,6 +7,7 @@ Reference
.. toctree::
:maxdepth: 1
+ macros
datatypes
functions
cpp/index.rst
diff --git a/docs/source/development/reference/macros.rst b/docs/source/development/reference/macros.rst
new file mode 100644
index 00000000..131b8e72
--- /dev/null
+++ b/docs/source/development/reference/macros.rst
@@ -0,0 +1,39 @@
+.. _macros:
+
+================================================================================
+Macros
+================================================================================
+
+.. c:macro:: PROJ_VERSION_MAJOR
+
+ Major version number, e.g 8 for PROJ 8.0.1
+
+.. c:macro:: PROJ_VERSION_MINOR
+
+ Minor version number, e.g 0 for PROJ 8.0.1
+
+.. c:macro:: PROJ_VERSION_PATCH
+
+ Patch version number, e.g 1 for PROJ 8.0.1
+
+.. c:macro:: PROJ_COMPUTE_VERSION(maj,min,patch)
+
+ .. versionadded:: 8.0.1
+
+ Compute the version number from the major, minor and patch numbers.
+
+.. c:macro:: PROJ_VERSION_NUMBER
+
+ .. versionadded:: 8.0.1
+
+ Total version number, equal to
+ ``PROJ_COMPUTE_VERSION(PROJ_VERSION_MAJOR, PROJ_VERSION_MINOR, PROJ_VERSION_PATCH)``
+
+.. c:macro:: PROJ_AT_LEAST_VERSION(maj,min,patch)
+
+ .. versionadded:: 8.0.1
+
+ Macro that returns true if the current PROJ version is at least the version
+ specified by (maj,min,patch)
+
+ Equivalent to ``PROJ_VERSION_NUMBER >= PROJ_COMPUTE_VERSION(maj,min,patch)``