Skip to content

Commit

Permalink
Correct ENV variables (#3841)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Nov 11, 2023
1 parent 5e0b59a commit a6e610e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions config/cmake/examples/HDF5_Examples.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${

if(NOT DEFINED INSTALLDIR)
if(WIN32)
set(INSTALLDIR "%ProgramFiles%/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@")
set(INSTALLDIR "\"%ProgramFiles%/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@\"")
else()
set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
endif()
Expand All @@ -78,6 +78,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN

###############################################################################################################
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ROOT:PATH=${INSTALLDIR}")
set (ENV{HDF5_ROOT} "${INSTALLDIR}")
if(WIN32)
set(SITE_OS_NAME "Windows")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
Expand All @@ -98,11 +99,11 @@ endif()
set(ENV{HDF5_PLUGIN_PATH} "${INSTALLDIR}/lib/plugin")
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
### use a toolchain file (supported everywhere) ####
if(NOT DEFINED CTEST_TOOLCHAIN_FILE)
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=@CTEST_TOOLCHAIN_FILE@")
else()
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=${CTEST_TOOLCHAIN_FILE}")
endif()
#if(NOT DEFINED CTEST_TOOLCHAIN_FILE)
# set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=@CTEST_TOOLCHAIN_FILE@")
#else()
# set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=${CTEST_TOOLCHAIN_FILE}")
#endif()

###############################################################################################################
# For any comments please contact [email protected]
Expand Down

0 comments on commit a6e610e

Please sign in to comment.