summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-01-08 18:57:11 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-01-08 18:57:11 (GMT)
commit7bd06dccb543a35763a967e3f84f3c8d89f0c538 (patch)
treeb8bf6720d47466edaaf460733b88d7b5c5f57900
parentc9e0dc95335b07724ae20b5f84c37f1350f3ec5c (diff)
parent531f4d839d92f3991fed30b1587eddabb949a2b0 (diff)
downloadhdf5-7bd06dccb543a35763a967e3f84f3c8d89f0c538.zip
hdf5-7bd06dccb543a35763a967e3f84f3c8d89f0c538.tar.gz
hdf5-7bd06dccb543a35763a967e3f84f3c8d89f0c538.tar.bz2
Merge pull request #849 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_8 to hdf5_1_8
* commit '531f4d839d92f3991fed30b1587eddabb949a2b0': Fix link_libs and static CRT fortran
-rw-r--r--config/cmake_ext_mod/HDFUseFortran.cmake8
-rw-r--r--testpar/CMakeLists.txt4
2 files changed, 10 insertions, 2 deletions
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 7bf4d81..5be2c49 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -15,6 +15,14 @@
#-------------------------------------------------------------------------------
ENABLE_LANGUAGE (Fortran)
+#-------------------------------------------------------------------------------
+# Fix Fortran flags if we are compiling staticly on Windows using
+# Windows_MT.cmake from config/cmake/UserMacros
+#-------------------------------------------------------------------------------
+if (BUILD_STATIC_CRT_LIBS)
+ TARGET_STATIC_CRT_FLAGS ()
+endif ()
+
#-----------------------------------------------------------------------------
# Detect name mangling convention used between Fortran and C
#-----------------------------------------------------------------------------
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 1043cd6..629216f 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -29,7 +29,7 @@ set (testphdf5_SRCS
add_executable (testphdf5 ${testphdf5_SRCS})
TARGET_NAMING (testphdf5 STATIC)
TARGET_C_PROPERTIES (testphdf5 STATIC " " " ")
-target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+target_link_libraries (testphdf5 PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
target_link_libraries (testphdf5 PRIVATE ${MPI_C_LIBRARIES})
endif ()
@@ -39,7 +39,7 @@ MACRO (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
TARGET_NAMING (${file} STATIC)
TARGET_C_PROPERTIES (${file} STATIC " " " ")
- target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+ target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
target_link_libraries (${file} PRIVATE ${MPI_C_LIBRARIES})
endif ()