summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-05-07 22:23:25 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-05-07 22:23:25 (GMT)
commit4c4042121c4a8ca7092c23b41ba1e35001606ed3 (patch)
tree72ec273fa8a45bbc74479e019afbe13ad9584916
parent424e2275bc411226bf16741595b782deab6b92d9 (diff)
downloadhdf5-4c4042121c4a8ca7092c23b41ba1e35001606ed3.zip
hdf5-4c4042121c4a8ca7092c23b41ba1e35001606ed3.tar.gz
hdf5-4c4042121c4a8ca7092c23b41ba1e35001606ed3.tar.bz2
Use set_property for MT flag
-rw-r--r--fortran/src/CMakeLists.txt15
-rw-r--r--fortran/test/CMakeLists.txt15
2 files changed, 18 insertions, 12 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 9bcdd29..a29fb86 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -48,12 +48,15 @@ target_include_directories(H5_buildiface
PRIVATE
"${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}"
)
-if (BUILD_SHARED_LIBS)
- target_compile_definitions(H5_buildiface
- PRIVATE
- $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
- )
-endif ()
+#if (BUILD_SHARED_LIBS)
+# target_compile_definitions(H5_buildiface
+# PRIVATE
+# $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
+# )
+#endif ()
+if(MSVC)
+ set_property(TARGET H5_buildiface PROPERTY COMPILE_FLAGS "/MT")
+endif()
#set_property(TARGET H5_buildiface APPEND PROPERTY
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
#)
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index c311139..b45154e 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -11,12 +11,15 @@ target_include_directories(H5_test_buildiface
PRIVATE
${HDF5_BINARY_DIR} ${HDF5_F90_BINARY_DIR}
)
-if (BUILD_SHARED_LIBS)
- target_compile_definitions(H5_test_buildiface
- PRIVATE
- $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
- )
-endif ()
+#if (BUILD_SHARED_LIBS)
+# target_compile_definitions(H5_test_buildiface
+# PRIVATE
+# $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
+# )
+#endif ()
+if(MSVC)
+ set_property(TARGET H5_test_buildiface PROPERTY COMPILE_FLAGS "/MT")
+endif()
#set_property(TARGET H5_test_buildiface APPEND PROPERTY
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
#)