summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-05-03 15:44:57 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-05-03 15:44:57 (GMT)
commit01a77cbfb17d8802a9f135bb95a2b2ec57f75410 (patch)
tree5ddb626fd46c8f784b890f5a575f0ab5eccfe2c6 /fortran/src
parent1ab0814a4320eb8a4b93a85048419302218aeb34 (diff)
downloadhdf5-01a77cbfb17d8802a9f135bb95a2b2ec57f75410.zip
hdf5-01a77cbfb17d8802a9f135bb95a2b2ec57f75410.tar.gz
hdf5-01a77cbfb17d8802a9f135bb95a2b2ec57f75410.tar.bz2
LINK_FLAGS must be separate property sets
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/CMakeLists.txt31
1 files changed, 21 insertions, 10 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index cbc14c3..670e159 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -54,11 +54,12 @@ 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_target_properties (H5_buildiface PROPERTIES
LINKER_LANGUAGE Fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
- LINK_FLAGS
- "$<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:\"-SUBSYSTEM:CONSOLE\">"
)
if (BUILD_SHARED_LIBS)
@@ -265,13 +266,16 @@ 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_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
- LINK_FLAGS
- "$<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:\"-SUBSYSTEM:CONSOLE\">
- $<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:${WIN_LINK_FLAGS}>"
)
H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
@@ -300,15 +304,22 @@ 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_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- LINK_FLAGS
- "$<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:\"-SUBSYSTEM:CONSOLE\">
- $<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:${WIN_LINK_FLAGS}>
- $<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:\"-DLL\">
- $<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:\"-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def\">"
)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F")