summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2018-06-08 20:42:31 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2018-06-08 20:42:31 (GMT)
commitcc2154c13c78d0f34faf5a68e2deac055330f17b (patch)
tree04b6afd77ad80327a71309d17463e22a20be5253
parentf484649347152316229f607f782ea269ebbc5994 (diff)
parente87be2e9e770fbe6f54f11551cabff60273f1461 (diff)
downloadhdf5-cc2154c13c78d0f34faf5a68e2deac055330f17b.zip
hdf5-cc2154c13c78d0f34faf5a68e2deac055330f17b.tar.gz
hdf5-cc2154c13c78d0f34faf5a68e2deac055330f17b.tar.bz2
Merge branch 'develop' into hdf5_1_10.sync
-rw-r--r--fortran/examples/CMakeLists.txt6
-rw-r--r--fortran/src/CMakeLists.txt6
-rw-r--r--fortran/test/CMakeLists.txt4
-rw-r--r--hl/fortran/src/CMakeLists.txt4
4 files changed, 11 insertions, 9 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 68b817e..0c570c6 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -155,7 +155,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
target_include_directories (f90_ex_ph5example
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
)
target_compile_options(f90_ex_ph5example
PRIVATE
@@ -164,6 +164,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_link_libraries (f90_ex_ph5example
PRIVATE
${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
+ $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
# set_property(TARGET f90_ex_ph5example APPEND PROPERTY
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
@@ -183,7 +184,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
target_include_directories (f90_ex_ph5example-shared
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
)
target_compile_options(f90_ex_ph5example-shared
PRIVATE
@@ -192,6 +193,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_link_libraries (f90_ex_ph5example-shared
PRIVATE
${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
+ $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
# set_property(TARGET f90_ex_ph5example-shared APPEND PROPERTY
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 5750d05..025fab5 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -81,7 +81,7 @@ add_executable (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
)
-target_include_directories(H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR}")
+target_include_directories(H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
@@ -137,7 +137,7 @@ set (f90CStub_C_SHHDRS
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
target_include_directories(${HDF5_F90_C_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC)
@@ -153,7 +153,7 @@ set (install_targets ${HDF5_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
target_include_directories(${HDF5_F90_C_LIBSH_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_definitions(${HDF5_F90_C_LIBSH_TARGET}
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index fc1add1..b862fcd 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -44,7 +44,7 @@ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE
add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC)
@@ -60,7 +60,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_definitions(${HDF5_F90_C_TEST_LIBSH_TARGET}
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index fddfcf8..7ec3b63 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -56,7 +56,7 @@ set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
target_include_directories(${HDF5_HL_F90_C_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC)
@@ -72,7 +72,7 @@ set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_definitions(${HDF5_LIBSH_TARGET}