summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/CMakeLists.txt54
-rw-r--r--fortran/src/CMakeLists.txt31
-rw-r--r--fortran/test/CMakeLists.txt120
-rw-r--r--fortran/testpar/CMakeLists.txt9
4 files changed, 143 insertions, 71 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 3347480..5329e29 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -47,13 +47,16 @@ foreach (example ${examples})
PRIVATE
${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
)
+ set_property(TARGET f90_ex_${example} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET f90_ex_${example} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (f90_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/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}>"
)
if (BUILD_SHARED_LIBS)
add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
@@ -70,13 +73,16 @@ foreach (example ${examples})
PRIVATE
${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
)
+ set_property(TARGET f90_ex_${example}-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET f90_ex_${example}-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (f90_ex_${example}-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/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}>"
)
endif ()
endforeach ()
@@ -95,13 +101,16 @@ foreach (example ${F2003_examples})
PRIVATE
${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
)
+ set_property(TARGET f03_ex_${example} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET f03_ex_${example} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (f03_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran03
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}>"
)
if (BUILD_SHARED_LIBS)
add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
@@ -118,13 +127,16 @@ foreach (example ${F2003_examples})
PRIVATE
${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
)
+ set_property(TARGET f03_ex_${example}-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET f03_ex_${example}-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (f03_ex_${example}-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran03
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}>"
)
endif ()
endforeach ()
@@ -143,13 +155,16 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
PRIVATE
${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
)
+ set_property(TARGET f90_ex_ph5example APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET f90_ex_ph5example APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (f90_ex_ph5example PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/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}>"
)
if (BUILD_SHARED_LIBS)
add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
@@ -166,13 +181,16 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
PRIVATE
${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
)
+ set_property(TARGET f90_ex_ph5example-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET f90_ex_ph5example-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (f90_ex_ph5example-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/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}>"
)
endif ()
endif ()
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")
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index d1247a1..964d588 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -17,11 +17,12 @@ if (BUILD_SHARED_LIBS)
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
)
endif ()
+set_property(TARGET H5_test_buildiface APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+)
set_target_properties (H5_test_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)
@@ -132,13 +133,16 @@ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
PUBLIC
${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
)
+set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+)
+set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+)
set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/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_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC 0)
add_dependencies(${HDF5_F90_TEST_LIB_TARGET} H5testgen)
@@ -163,14 +167,19 @@ if (BUILD_SHARED_LIBS)
PUBLIC
${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
)
+ set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
+ set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">
+ )
set_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES
FOLDER libraries/test/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\">"
)
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED "F")
add_dependencies(${HDF5_F90_TEST_LIBSH_TARGET} H5testgenSH)
@@ -200,7 +209,8 @@ add_executable (testhdf5_fortran
)
target_include_directories (testhdf5_fortran
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+)
target_compile_options(testhdf5_fortran
PRIVATE
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
@@ -209,13 +219,16 @@ target_link_libraries (testhdf5_fortran
PRIVATE
${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+set_property(TARGET testhdf5_fortran APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+)
+set_property(TARGET testhdf5_fortran APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+)
set_target_properties (testhdf5_fortran PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET})
@@ -250,13 +263,16 @@ if (BUILD_SHARED_LIBS)
PRIVATE
${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+ set_property(TARGET testhdf5_fortran-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET testhdf5_fortran-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (testhdf5_fortran-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (testhdf5_fortran-shared ${HDF5_F90_TEST_LIBSH_TARGET})
endif ()
@@ -282,13 +298,16 @@ target_link_libraries (testhdf5_fortran_1_8
PRIVATE
${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+set_property(TARGET testhdf5_fortran_1_8 APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+)
+set_property(TARGET testhdf5_fortran_1_8 APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+)
set_target_properties (testhdf5_fortran_1_8 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET})
@@ -314,13 +333,16 @@ if (BUILD_SHARED_LIBS)
PRIVATE
${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+ set_property(TARGET testhdf5_fortran_1_8-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET testhdf5_fortran_1_8-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (testhdf5_fortran_1_8-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (testhdf5_fortran_1_8-shared ${HDF5_F90_TEST_LIBSH_TARGET})
endif ()
@@ -348,13 +370,16 @@ target_link_libraries (fortranlib_test_F03
PRIVATE
${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+set_property(TARGET fortranlib_test_F03 APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+)
+set_property(TARGET fortranlib_test_F03 APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+)
set_target_properties (fortranlib_test_F03 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (fortranlib_test_F03 ${HDF5_F90_TEST_LIB_TARGET})
@@ -382,13 +407,16 @@ if (BUILD_SHARED_LIBS)
PRIVATE
${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+ set_property(TARGET fortranlib_test_F03-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET fortranlib_test_F03-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (fortranlib_test_F03-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (fortranlib_test_F03-shared ${HDF5_F90_TEST_LIBSH_TARGET})
endif ()
@@ -407,13 +435,16 @@ target_link_libraries (fflush1
PRIVATE
${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+set_property(TARGET fflush1 APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+)
+set_property(TARGET fflush1 APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+)
set_target_properties (fflush1 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (fflush1 ${HDF5_F90_TEST_LIB_TARGET})
@@ -432,13 +463,16 @@ if (BUILD_SHARED_LIBS)
PRIVATE
${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+ set_property(TARGET fflush1-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET fflush1-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (fflush1-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (fflush1-shared ${HDF5_F90_TEST_LIBSH_TARGET})
endif ()
@@ -457,13 +491,16 @@ target_link_libraries (fflush2
PRIVATE
${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+set_property(TARGET fflush2 APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+)
+set_property(TARGET fflush2 APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+)
set_target_properties (fflush2 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (fflush2 ${HDF5_F90_TEST_LIB_TARGET})
@@ -482,13 +519,16 @@ if (BUILD_SHARED_LIBS)
PRIVATE
${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
)
+ set_property(TARGET fflush2-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+ )
+ set_property(TARGET fflush2-shared APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+ )
set_target_properties (fflush2-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/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}>"
)
add_dependencies (fflush2-shared ${HDF5_F90_TEST_LIBSH_TARGET})
endif ()
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 3d89e5e..5ead405 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -29,12 +29,15 @@ target_link_libraries (parallel_test
${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS}
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"ws2_32.lib">
)
+set_property(TARGET parallel_test APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+)
+set_property(TARGET parallel_test APPEND_STRING PROPERTY
+ LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+)
set_target_properties (parallel_test PROPERTIES
FOLDER test/fortran
LINKER_LANGUAGE Fortran
- LINK_FLAGS
- "$<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:\"-SUBSYSTEM:CONSOLE\">
- $<$<STREQUAL:\"x${CMAKE_Fortran_SIMULATE_ID}\",\"xMSVC\">:${WIN_LINK_FLAGS}>"
)
endif ()