summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c++/src/CMakeLists.txt6
-rw-r--r--fortran/src/CMakeLists.txt6
-rw-r--r--hl/c++/src/CMakeLists.txt6
-rw-r--r--hl/fortran/src/CMakeLists.txt6
-rw-r--r--hl/src/CMakeLists.txt6
-rw-r--r--src/CMakeLists.txt20
6 files changed, 44 insertions, 6 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 8608c67..4b1a2d6 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -209,7 +209,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5c++
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 120dc1a..ae815f2 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -556,7 +556,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_Fortran_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_Fortran_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5fc
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 1eac9fe..e488656 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -120,7 +120,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlc++
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 38529b4..4f0b451 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -353,7 +353,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_Fortran_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_Fortran_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlfc
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 785bdcf..427424e 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -152,7 +152,11 @@ install (
)
if (NOT WIN32 AND NOT MINGW)
- set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_C_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5hlcc
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a2d4c37..0d2d960 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1352,7 +1352,11 @@ install (
)
if (NOT WIN32)
- set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
+ set (_PKG_CONFIG_COMPILER ${MPI_C_COMPILER})
+ else ()
+ set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5cc
@@ -1364,6 +1368,20 @@ if (NOT WIN32)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
COMPONENT libraries
)
+ if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
+ #legacy requires a different name
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5pcc
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5pcc
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT libraries
+ )
+ endif ()
endif ()
#-----------------------------------------------------------------------------