Skip to content

Commit

Permalink
Update FindTPLHDF5.cmake to use TRIBITS_TPL_ALLOW_PRE_FIND_PACKAGE (T…
Browse files Browse the repository at this point in the history
…riBITS TriBITSPub#59 and TriBITSPub#67)

With this update, FindTPLHDF5.cmake should maintain good backward
compatibility but will still call FIND_PACKAGE(HDF5 ...) by default if the
user does nothing.
  • Loading branch information
Roscoe A. Bartlett committed May 6, 2015
1 parent 18109d5 commit 4299811
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tribits/common_tpls/FindTPLHDF5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
#
# First search for HDF5 components using standard FIND_PACKAGE(HDF5 ...)
#
IF ("${TPL_HDF5_INCLUDE_DIRS}" STREQUAL "" AND "${TPL_HDF5_LIBRARIES}" STREQUAL "")
TRIBITS_TPL_ALLOW_PRE_FIND_PACKAGE(HDF5 HDF5_ALLOW_PREFIND)
IF (HDF5_ALLOW_PREFIND)

MESSAGE("-- Using FIND_PACKAGE(HDF5 ...) ...")

SET(HDF5_COMPNENTS C)
IF (HDF5_REQUIRE_FORTRAN)
Expand All @@ -77,8 +80,8 @@ IF ("${TPL_HDF5_INCLUDE_DIRS}" STREQUAL "" AND "${TPL_HDF5_LIBRARIES}" STREQUAL
ENDIF()

#
# Set up default find operation using TriBITS system in case the default
# FIND_PACKAGE(HDF5 command was not used).
# Second, set up default find operation using TriBITS system in case the
# default FIND_PACKAGE(HDF5 command was not used).
#

SET(REQUIRED_HEADERS hdf5.h)
Expand Down

0 comments on commit 4299811

Please sign in to comment.