summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt22
-rw-r--r--ConfigureChecks.cmake9
-rw-r--r--fortran/CMakeLists.txt10
-rw-r--r--hl/fortran/src/CMakeLists.txt3
-rw-r--r--src/CMakeLists.txt2
5 files changed, 32 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc7e2fa..e00ebf3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,6 +352,14 @@ IF (HDF5_ENABLE_PARALLEL)
INCLUDE_DIRECTORIES (${MPI_INCLUDE_PATH})
IF (MPI_FOUND)
SET (H5_HAVE_PARALLEL 1)
+ # MPI checks, only do these if MPI_FOUND is true, otherwise they always fail
+ # and once set, they are cached as false and not regenerated
+ SET (CMAKE_REQUIRED_INCLUDES "${MPI_INCLUDE_PATH}/mpi.h" )
+ SET (CMAKE_REQUIRED_LIBRARIES "${MPI_LIBRARY}" )
+ CHECK_FUNCTION_EXISTS (MPI_File_get_size H5_HAVE_MPI_GET_SIZE)
+ # Used by Fortran + MPI
+ CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
+ CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
ENDIF (MPI_FOUND)
ENDIF (HDF5_ENABLE_PARALLEL)
@@ -460,8 +468,10 @@ ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src)
#-----------------------------------------------------------------------------
# Build utility to copy and strip X lines of file
#-----------------------------------------------------------------------------
-SET (XLATE_UTILITY "xlatefile")
-ADD_EXECUTABLE(${XLATE_UTILITY} ${HDF5_SOURCE_DIR}/Resources/xlatefile.c)
+IF (HDF5_BUILD_TOOLS AND BUILD_TESTING)
+ SET (XLATE_UTILITY "xlatefile")
+ ADD_EXECUTABLE(${XLATE_UTILITY} ${HDF5_SOURCE_DIR}/Resources/xlatefile.c)
+ENDIF (HDF5_BUILD_TOOLS AND BUILD_TESTING)
#-----------------------------------------------------------------------------
# Dashboard and Testing Settings
@@ -556,6 +566,14 @@ INSTALL (
HDF5-config.cmake
)
+# The install rule below copies compiled module files to the install location
+# using a "code" rule. The code string should not be broken up, it must be on one line
+IF (HDF5_BUILD_FORTRAN)
+ INSTALL ( CODE
+ "EXECUTE_PROCESS (COMMAND \"${CMAKE_COMMAND}\" -E copy_directory \"${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}\" \"${CMAKE_INSTALL_PREFIX}/fortran\")"
+ )
+ENDIF (HDF5_BUILD_FORTRAN)
+
#-----------------------------------------------------------------------------
# Export all exported targets to the build tree for use by parent project
#-----------------------------------------------------------------------------
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 46f85bb..d0ba2e2 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -367,15 +367,6 @@ CHECK_FUNCTION_EXISTS (ftello H5_HAVE_FTELLO)
CHECK_FUNCTION_EXISTS (fstat64 H5_HAVE_FSTAT64)
CHECK_FUNCTION_EXISTS (stat64 H5_HAVE_STAT64)
-# MPI checks
-SET (CMAKE_REQUIRED_INCLUDES "${MPI_INCLUDE_PATH}/mpi.h" )
-SET (CMAKE_REQUIRED_LIBRARIES "${MPI_LIBRARY}" )
-CHECK_FUNCTION_EXISTS (MPI_File_get_size H5_HAVE_MPI_GET_SIZE)
-
-# For Fortran+MPI
-CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
-CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
-
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index a649fab..cf003ea 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -116,6 +116,16 @@ INCLUDE_DIRECTORIES(
)
#-----------------------------------------------------------------------------
+# Add debug information (intel Fortran : JB)
+#-----------------------------------------------------------------------------
+IF (CMAKE_Fortran_COMPILER MATCHES ifort)
+ IF (WIN32)
+ SET (CMAKE_Fortran_FLAGS_DEBUG "/debug:full " CACHE "flags" STRING FORCE)
+ SET (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
+ ENDIF (WIN32)
+ENDIF (CMAKE_Fortran_COMPILER MATCHES ifort)
+
+#-----------------------------------------------------------------------------
# Traverse source subdirectory
#-----------------------------------------------------------------------------
ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src)
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index a967d54..819dc1e 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -21,9 +21,6 @@ LINK_DIRECTORIES (
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
-#MESSAGE ("Fortran source is in ${HDF5_F90_SOURCE_DIR}/src ")
-
-
SET (HDF5_HL_F90_F_SRCS
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9e4e3f3..e77ec8f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -17,6 +17,8 @@ SET (H5_HDRS
${HDF5_SRC_DIR}/hdf5.h
${HDF5_SRC_DIR}/H5api_adpt.h
${HDF5_SRC_DIR}/H5public.h
+ ${HDF5_SRC_DIR}/H5version.h
+ ${HDF5_SRC_DIR}/H5overflow.h
)
IDE_GENERATED_PROPERTIES ("H5" "${H5_HDRS}" "${H5_SRCS}" )