summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-08-31 20:15:13 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-08-31 20:15:13 (GMT)
commite65aa8c36566febd00da128e64cc90f3c8ffbc70 (patch)
tree1c52c1ccdf6b28b73702da3b49bad78f5414b33c /CMakeLists.txt
parentb8d1216dcac1b773f9a7f757ee4dca67547dc082 (diff)
downloadhdf5-e65aa8c36566febd00da128e64cc90f3c8ffbc70.zip
hdf5-e65aa8c36566febd00da128e64cc90f3c8ffbc70.tar.gz
hdf5-e65aa8c36566febd00da128e64cc90f3c8ffbc70.tar.bz2
[svn-r19325] Added parallel build commands.
Corrected use/name of source folder aliases. Duplicated FindMPI.cmake so that non-c++ compiler is found first (recommemded commands did not work). Tested: local linux with mpich
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt25
1 files changed, 16 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b79a29e..7e9ecc6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,13 +123,14 @@ SET (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME})
#-----------------------------------------------------------------------------
SET (HDF5_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake)
SET (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src)
-SET (HDF5_TEST_SOURCE_DIR ${HDF5_SOURCE_DIR}/test)
-SET (HDF5_CPP_SOURCE_DIR ${HDF5_SOURCE_DIR}/c++)
-SET (HDF5_CPP_TEST_DIR ${HDF5_CPP_SOURCE_DIR}/test)
-SET (HDF5_HL_SOURCE_DIR ${HDF5_SOURCE_DIR}/hl)
-SET (HDF5_TOOLS_SOURCE_DIR ${HDF5_SOURCE_DIR}/tools)
-SET (HDF5_PERFORM_SOURCE_DIR ${HDF5_SOURCE_DIR}/perform)
-SET (HDF5_F90_SOURCE_DIR ${HDF5_SOURCE_DIR}/fortran)
+SET (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test)
+SET (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++)
+SET (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test)
+SET (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl)
+SET (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++)
+SET (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools)
+SET (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/perform)
+SET (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran)
# set default prefix location
SET (CMAKE_INSTALL_PREFIX "./hdf5" CACHE PATH "Install path prefix, prepended onto install directories")
@@ -370,6 +371,7 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR})
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
#-----------------------------------------------------------------------------
+SET (CMAKE_MODULE_PATH ${HDF5_RESOURCES_DIR} ${CMAKE_MODULE_PATH})
OPTION (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
IF (HDF5_ENABLE_PARALLEL)
INCLUDE (FindMPI)
@@ -515,6 +517,11 @@ IF (BUILD_TESTING)
IF (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform")
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/perform ${PROJECT_BINARY_DIR}/perform)
ENDIF(EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform")
+ IF (H5_HAVE_PARALLEL)
+ IF (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
+ ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar)
+ ENDIF (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
+ ENDIF (H5_HAVE_PARALLEL)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
INCLUDE (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
ENDIF (BUILD_TESTING)
@@ -630,8 +637,8 @@ ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
# Configure the hdf5-config.cmake file for the build directory
#-----------------------------------------------------------------------------
SET (HDF5_INCLUDES_BUILD_TIME
- ${HDF5_SRC_DIR} ${HDF5_CPP_SOURCE_DIR} ${HDF5_HL_SOURCE_DIR}
- ${HDF5_TOOLS_SOURCE_DIR} ${HDF5_BINARY_DIR}
+ ${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
+ ${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
)
SET (HDF5_VERSION_STRING @HDF5_PACKAGE_VERSION@)
SET (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@)