summaryrefslogtreecommitdiffstats
path: root/doc/cmake-vols-fetchcontent.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/cmake-vols-fetchcontent.md')
-rw-r--r--doc/cmake-vols-fetchcontent.md69
1 files changed, 46 insertions, 23 deletions
diff --git a/doc/cmake-vols-fetchcontent.md b/doc/cmake-vols-fetchcontent.md
index 5f7b3d4..9d3c1ba 100644
--- a/doc/cmake-vols-fetchcontent.md
+++ b/doc/cmake-vols-fetchcontent.md
@@ -18,19 +18,18 @@ are the following:
## Building
To enable building of an HDF5 VOL connector using HDF5's CMake functionality,
-two CMake variables must first be set:
+a CMake variable must first be set:
- HDF5_VOL_ALLOW_EXTERNAL (Default: OFF)
- This variable determines whether or not building of external HDF5 VOL connectors
- is enabled.
-
- HDF5_ALLOW_EXTERNAL_SUPPORT (Default: "NO")
+ HDF5_VOL_ALLOW_EXTERNAL (Default: "NO")
This variable is a string that specifies the manner in which the source code for
- an external VOL connector will be retrieved. Currently, this variable must be set
- to "GIT" for building external VOL connectors.
+ an external VOL connector will be retrieved. This variable must be set
+ to "GIT" for building external VOL connectors from a Github repository, or
+ set to "LOCAL_DIR" to build from a local source directory.
+
+
+### Building
-Once the `HDF5_VOL_ALLOW_EXTERNAL` option is set to ON and the `HDF5_ALLOW_EXTERNAL_SUPPORT`
-variable is set to "GIT", the CMake cache will be populated with a predefined
+If the `HDF5_VOL_ALLOW_EXTERNAL` option is set to "GIT", the CMake cache will be populated with a predefined
(currently 10) amount of new variables, named:
HDF5_VOL_URL01
@@ -49,7 +48,26 @@ For each URL specified, HDF5's CMake code will attempt to use CMake's
[FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html)
functionality to retrieve the source code for a VOL connector pointed to by
that URL and will try to build that VOL connector as part of the HDF5 library
-build process. The VOL connector must be able to be built by CMake and currently
+build process.
+
+If `HDF5_VOL_ALLOW_EXTERNAL` is instead set to "LOCAL_DIR", then the CMake cache
+will instead be populated with the variables:
+
+ HDF5_VOL_PATH01
+ HDF5_VOL_PATH02
+ HDF5_VOL_PATH03
+ ...
+
+For each of these variables, an absolute path that points to a local
+directory containing source code for an HDF5 VOL connector
+can be specified. For example, to specify a local clone of the
+REST VOL connector stored under one's home directory, one can provide
+the following option to `cmake`:
+
+ -DHDF5_VOL_PATH01=/home/vol-rest
+
+Regardless of the method used to obtain the VOL source code,
+the VOL connector must be able to be built by CMake and currently
must have a CMakeLists.txt file in the top level of the source tree in order to
be buildable by this process. If the source code for a VOL connector is successfully
retrieved, the HDF5 build's CMake cache will be populated with variables from
@@ -57,18 +75,17 @@ the VOL connector's CMake code, as if one were building the connector by itself.
This gives one the ability to customize the build of the connector as usual.
The CMake cache will also be populated with a few new variables for each VOL
-connector that was successfully retrieved from a given URL. To generate these
-variables, the CMake code first creates an internal name for the VOL connector
+connector that was successfully retrieved. To generate these
+variables, the CMake code first creates an internal name for the VOL connector.
+If the source was retrieved from a URL, then the name is generated
by stripping off the last part of the Git repository URL given for the connector,
removing the ".git" suffix and any whitespace and then upper-casing the result.
For example, the name of the VOL connector located at the URL
-https://github.com/hpc-io/vol-async.git would become "VOL-ASYNC". Then, the following
-new variables get created:
+https://github.com/hpc-io/vol-async.git would become "VOL-ASYNC". If the source was
+retrieved from a local directory, then the source directory's name is trimmed of whitespace,
+upper-cased, and has any trailing slashes removed.
- HDF5_VOL_<VOL name>_BRANCH (Default: "main")
- This variable specifies the git branch name or tag to use when fetching
- the source code for the VOL connector with the CMake-internal name
- '<VOL name>'.
+After the VOL's internal name is generated, the following new variables get created:
HDF5_VOL_<VOL name>_NAME (Default: "")
This variable specifies the string that should be used when setting the
@@ -84,8 +101,15 @@ new variables get created:
This variable determines whether the VOL connector with the CMake-internal
name '<VOL name>' should be tested against HDF5's parallel tests.
+If the source was retrieved from a Git URL, then the following variable will additionally be created:
+
+ HDF5_VOL_<VOL name>_BRANCH (Default: "main")
+ This variable specifies the git branch name or tag to use when fetching
+ the source code for the VOL connector with the CMake-internal name
+ '<VOL name>'.
+
As an example, this would create the following variables for the
-previously-mentioned VOL connector:
+previously-mentioned VOL connector if it is retrieved from a URL:
HDF5_VOL_VOL-ASYNC_BRANCH
HDF5_VOL_VOL-ASYNC_NAME
@@ -99,7 +123,7 @@ doesn't parse the string as a list. If `cmake` is run from a shell, extra care
may need to be taken when escaping the semicolons depending on how the
shell interprets backslashes.
-### Example - Build and test HDF5 Asynchronous I/O VOL connector
+### Example - Build and test HDF5 Asynchronous I/O VOL connector from GIT
Assuming that the HDF5 source code has been checked out and a build directory
has been created, running the following cmake command from that build directory
@@ -113,8 +137,7 @@ would typically be passed when building HDF5, such as `CMAKE_INSTALL_PREFIX`,
-DHDF5_ENABLE_PARALLEL=ON
-DALLOW_UNSUPPORTED=ON
-DHDF5_TEST_API=ON
- -DHDF5_VOL_ALLOW_EXTERNAL=ON
- -DHDF5_ALLOW_EXTERNAL_SUPPORT="GIT"
+ -DHDF5_VOL_ALLOW_EXTERNAL="GIT"
-DHDF5_VOL_URL01=https://github.com/hpc-io/vol-async.git
-DHDF5_VOL_VOL-ASYNC_BRANCH=develop
-DHDF5_VOL_VOL-ASYNC_NAME="async under_vol=0\;under_info={}"