[Cmake-commits] CMake branch, next, updated. v3.3.1-2871-g18b3833
Brad King
brad.king at kitware.com
Fri Sep 11 14:28:09 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 18b3833be1944ac2b7d0ba87d0df496aa7a4fc5f (commit)
via fd26a19afc24ac6ce62c4c31ec589c0d296f15de (commit)
from 89b5d899740196524b0d024ba46293fc4fb8aeda (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18b3833be1944ac2b7d0ba87d0df496aa7a4fc5f
commit 18b3833be1944ac2b7d0ba87d0df496aa7a4fc5f
Merge: 89b5d89 fd26a19
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 11 14:28:09 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 11 14:28:09 2015 -0400
Merge topic 'FindHDF5-updates' into next
fd26a19a FindHDF5: Add NAMES_PER_DIR and introduce HDF5_PREFER_PARALLEL
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd26a19afc24ac6ce62c4c31ec589c0d296f15de
commit fd26a19afc24ac6ce62c4c31ec589c0d296f15de
Author: Paul Romano <paul.k.romano at gmail.com>
AuthorDate: Sat Sep 12 00:07:05 2015 +0800
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 11 14:27:08 2015 -0400
FindHDF5: Add NAMES_PER_DIR and introduce HDF5_PREFER_PARALLEL
The calls to find_program now use NAMES_PER_DIR so that the first executable
(e.g. h5pcc) appearing on their PATH will get chosen. The HDF5_PREFER_PARALLEL
variable swaps the search order when it is set to true in the event that a
directory being search contains both h5cc and h5pcc.
diff --git a/Help/release/dev/FindHDF5-updates.rst b/Help/release/dev/FindHDF5-updates.rst
new file mode 100644
index 0000000..a9297bb
--- /dev/null
+++ b/Help/release/dev/FindHDF5-updates.rst
@@ -0,0 +1,6 @@
+FindHDF5-updates
+----------------
+
+* The :module:`FindHDF5` module learend a new ``HDF5_PREFER_PARALLEL``
+ option allowing users to specify that a parallel HDF5 tool is
+ preferred if both are available.
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index a449132..37bca83 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -31,6 +31,12 @@
# Find module will then look in this path when searching for HDF5
# executables, paths, and libraries.
#
+# Both the serial and parallel HDF5 wrappers are considered and the first
+# directory to contain either one will be used. In the event that both appear
+# in the same directory the serial version is preferentially selected. This
+# behavior can be reversed by setting the variable HDF5_PREFER_PARALLEL to
+# true.
+#
# In addition to finding the includes and libraries required to compile
# an HDF5 client application, this module also makes an effort to find
# tools that come with the HDF5 distribution that may be useful for
@@ -103,28 +109,43 @@ else()
endforeach()
endif()
+# Determine whether to search for serial or parallel executable first
+if(HDF5_PREFER_PARALLEL)
+ set(HDF5_C_COMPILER_NAMES h5pcc h5cc)
+ set(HDF5_CXX_COMPILER_NAMES h5pc++ h5c++)
+ set(HDF5_Fortran_COMPILER_NAMES h5pfc h5fc)
+else()
+ set(HDF5_C_COMPILER_NAMES h5cc h5pcc)
+ set(HDF5_CXX_COMPILER_NAMES h5c++ h5pc++)
+ set(HDF5_Fortran_COMPILER_NAMES h5fc h5pfc)
+endif()
+
# try to find the HDF5 wrapper compilers
find_program( HDF5_C_COMPILER_EXECUTABLE
- NAMES h5cc h5pcc
+ NAMES ${HDF5_C_COMPILER_NAMES} NAMES_PER_DIR
HINTS ENV HDF5_ROOT
PATH_SUFFIXES bin Bin
DOC "HDF5 Wrapper compiler. Used only to detect HDF5 compile flags." )
mark_as_advanced( HDF5_C_COMPILER_EXECUTABLE )
find_program( HDF5_CXX_COMPILER_EXECUTABLE
- NAMES h5c++ h5pc++
+ NAMES ${HDF5_CXX_COMPILER_NAMES} NAMES_PER_DIR
HINTS ENV HDF5_ROOT
PATH_SUFFIXES bin Bin
DOC "HDF5 C++ Wrapper compiler. Used only to detect HDF5 compile flags." )
mark_as_advanced( HDF5_CXX_COMPILER_EXECUTABLE )
find_program( HDF5_Fortran_COMPILER_EXECUTABLE
- NAMES h5fc h5pfc
+ NAMES ${HDF5_Fortran_COMPILER_NAMES} NAMES_PER_DIR
HINTS ENV HDF5_ROOT
PATH_SUFFIXES bin Bin
DOC "HDF5 Fortran Wrapper compiler. Used only to detect HDF5 compile flags." )
mark_as_advanced( HDF5_Fortran_COMPILER_EXECUTABLE )
+unset(HDF5_C_COMPILER_NAMES)
+unset(HDF5_CXX_COMPILER_NAMES)
+unset(HDF5_Fortran_COMPILER_NAMES)
+
find_program( HDF5_DIFF_EXECUTABLE
NAMES h5diff
HINTS ENV HDF5_ROOT
@@ -378,4 +399,3 @@ find_package_handle_standard_args( HDF5
REQUIRED_VARS HDF5_LIBRARIES HDF5_INCLUDE_DIRS
VERSION_VAR HDF5_VERSION
)
-
-----------------------------------------------------------------------
Summary of changes:
Help/release/dev/FindHDF5-updates.rst | 6 ++++++
Modules/FindHDF5.cmake | 28 ++++++++++++++++++++++++----
2 files changed, 30 insertions(+), 4 deletions(-)
create mode 100644 Help/release/dev/FindHDF5-updates.rst
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list