From f4bd832184b5ebcc5b18b0d625628cf7dd7e969a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 17 Mar 2021 15:52:22 +0100 Subject: Doc: add a page to document macros --- docs/source/development/reference/index.rst | 1 + docs/source/development/reference/macros.rst | 39 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 docs/source/development/reference/macros.rst (limited to 'docs/source/development/reference') 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)`` -- cgit v1.2.3