aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-03-17 15:52:22 +0100
committerEven Rouault <even.rouault@spatialys.com>2021-03-17 15:52:22 +0100
commitb37d7a72ee322c19e881728fc1e1ba25635b1c4a (patch)
treed22c1df2477edbeec218e179a7d8946355a8c330 /docs
parent130d70228f9985a3365ca5bbc64057648134e2f7 (diff)
downloadPROJ-b37d7a72ee322c19e881728fc1e1ba25635b1c4a.tar.gz
PROJ-b37d7a72ee322c19e881728fc1e1ba25635b1c4a.zip
Doc: add a page to document macros
Diffstat (limited to 'docs')
-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)``