summaryrefslogtreecommitdiffstats
path: root/CMakeInstallation.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-11-01 12:15:19 (GMT)
committerGitHub <noreply@github.com>2023-11-01 12:15:19 (GMT)
commita654b2c1c5670010e14d8fba6d287ce62c87169a (patch)
tree06d7c097fad284e468f58407c61931a1cecc931c /CMakeInstallation.cmake
parentf8ab865ce75821a2e24127b1d52ce3070980c298 (diff)
downloadhdf5-a654b2c1c5670010e14d8fba6d287ce62c87169a.zip
hdf5-a654b2c1c5670010e14d8fba6d287ce62c87169a.tar.gz
hdf5-a654b2c1c5670010e14d8fba6d287ce62c87169a.tar.bz2
Use the current toolchain for examples as default (#3810)
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r--CMakeInstallation.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 74ab8b1..02f8dc3 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -141,6 +141,10 @@ install (
#-----------------------------------------------------------------------------
option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
if (HDF5_PACK_EXAMPLES)
+ if (DEFINED CMAKE_TOOLCHAIN_FILE)
+ get_filename_component(TOOLCHAIN ${CMAKE_TOOLCHAIN_FILE} NAME)
+ set(CTEST_TOOLCHAIN_FILE "\${CTEST_SOURCE_DIRECTORY}/config/toolchain/${TOOLCHAIN}")
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/examples/HDF5_Examples.cmake.in
${HDF5_BINARY_DIR}/HDF5_Examples.cmake @ONLY