summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-05-03 16:57:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-05-03 16:57:30 (GMT)
commit1d1333ed6b51ef94862c50fe35fa52bea7756139 (patch)
tree5f02c4417e0846210a5e8f6d1a8280436edfe75c /fortran/src
parent01a77cbfb17d8802a9f135bb95a2b2ec57f75410 (diff)
downloadhdf5-1d1333ed6b51ef94862c50fe35fa52bea7756139.zip
hdf5-1d1333ed6b51ef94862c50fe35fa52bea7756139.tar.gz
hdf5-1d1333ed6b51ef94862c50fe35fa52bea7756139.tar.bz2
Revert to old style for LINK_FLAGS gen expr not working
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/CMakeLists.txt52
1 files changed, 31 insertions, 21 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 670e159..cafcbce 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -54,9 +54,13 @@ if (BUILD_SHARED_LIBS)
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
)
endif ()
-set_property(TARGET H5_buildiface APPEND_STRING PROPERTY
- LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-)
+#set_property(TARGET H5_buildiface APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+#)
+if(MSVC)
+ set_property(TARGET H5_buildiface APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE")
+endif()
+
set_target_properties (H5_buildiface PROPERTIES
LINKER_LANGUAGE Fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
@@ -266,12 +270,15 @@ target_link_libraries (${HDF5_F90_LIB_TARGET}
${LINK_Fortran_LIBS}
$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
-set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND_STRING PROPERTY
- LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-)
-set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND_STRING PROPERTY
- LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-)
+#set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+#)
+#set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+#)
+if(MSVC)
+ set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}")
+endif()
set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
@@ -304,18 +311,21 @@ if (BUILD_SHARED_LIBS)
PRIVATE
${LINK_Fortran_LIBS} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
- set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND_STRING PROPERTY
- LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
- )
- set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND_STRING PROPERTY
- LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
- )
- set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND_STRING PROPERTY
- LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">
- )
- set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND_STRING PROPERTY
- LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def">
- )
+# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+# )
+# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+# )
+# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">
+# )
+# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def">
+# )
+ if(MSVC)
+ set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS};-DLL;-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def")
+ endif()
set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran