diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-05-03 16:57:30 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-05-03 16:57:30 (GMT) |
commit | 1d1333ed6b51ef94862c50fe35fa52bea7756139 (patch) | |
tree | 5f02c4417e0846210a5e8f6d1a8280436edfe75c | |
parent | 01a77cbfb17d8802a9f135bb95a2b2ec57f75410 (diff) | |
download | hdf5-1d1333ed6b51ef94862c50fe35fa52bea7756139.zip hdf5-1d1333ed6b51ef94862c50fe35fa52bea7756139.tar.gz hdf5-1d1333ed6b51ef94862c50fe35fa52bea7756139.tar.bz2 |
Revert to old style for LINK_FLAGS gen expr not working
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 2 | ||||
-rw-r--r-- | fortran/examples/CMakeLists.txt | 35 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 52 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 195 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 15 | ||||
-rw-r--r-- | hl/fortran/examples/CMakeLists.txt | 15 | ||||
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 51 | ||||
-rw-r--r-- | hl/fortran/test/CMakeLists.txt | 30 |
8 files changed, 234 insertions, 161 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 7048db6..2bdf38f 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -33,7 +33,7 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage) if (APPLE) option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF) if (HDF5_BUILD_WITH_INSTALL_NAME) - set_property(TARGET ${libtarget} APPEND_STRING PROPERTY + set_property(TARGET ${libtarget} APPEND PROPERTY LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}" ) set_target_properties (${libtarget} PROPERTIES diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 5329e29..db1880b 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -47,12 +47,15 @@ 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_property(TARGET f90_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET f90_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:> +# ) + if(MSVC) + set_property(TARGET H5_buildiface APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran @@ -73,10 +76,10 @@ foreach (example ${examples}) PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) - set_property(TARGET f90_ex_${example}-shared APPEND_STRING PROPERTY + set_property(TARGET f90_ex_${example}-shared APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> ) - set_property(TARGET f90_ex_${example}-shared APPEND_STRING PROPERTY + set_property(TARGET f90_ex_${example}-shared APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> ) set_target_properties (f90_ex_${example}-shared PROPERTIES @@ -101,10 +104,10 @@ foreach (example ${F2003_examples}) PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) - set_property(TARGET f03_ex_${example} APPEND_STRING PROPERTY + set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> ) - set_property(TARGET f03_ex_${example} APPEND_STRING PROPERTY + set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> ) set_target_properties (f03_ex_${example} PROPERTIES @@ -127,10 +130,10 @@ foreach (example ${F2003_examples}) PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) - set_property(TARGET f03_ex_${example}-shared APPEND_STRING PROPERTY + set_property(TARGET f03_ex_${example}-shared APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> ) - set_property(TARGET f03_ex_${example}-shared APPEND_STRING PROPERTY + set_property(TARGET f03_ex_${example}-shared APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> ) set_target_properties (f03_ex_${example}-shared PROPERTIES @@ -155,10 +158,10 @@ 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 + set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> ) - set_property(TARGET f90_ex_ph5example APPEND_STRING PROPERTY + set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> ) set_target_properties (f90_ex_ph5example PROPERTIES @@ -181,10 +184,10 @@ 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 + set_property(TARGET f90_ex_ph5example-shared APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> ) - set_property(TARGET f90_ex_ph5example-shared APPEND_STRING PROPERTY + set_property(TARGET f90_ex_ph5example-shared APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> ) set_target_properties (f90_ex_ph5example-shared PROPERTIES 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 diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 964d588..f8d10a3 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -17,9 +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_property(TARGET H5_test_buildiface APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +if(MSVC) + set_property(TARGET H5_test_buildiface APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE") +endif() set_target_properties (H5_test_buildiface PROPERTIES LINKER_LANGUAGE Fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} @@ -133,12 +136,15 @@ 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_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") +endif() set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE Fortran @@ -167,15 +173,18 @@ 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_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) +# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL"> +# ) + if(MSVC) + set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS};-DLL") + endif() set_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test/fortran LINKER_LANGUAGE Fortran @@ -219,12 +228,15 @@ 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_property(TARGET testhdf5_fortran APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET testhdf5_fortran APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") +endif() set_target_properties (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -263,12 +275,15 @@ 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_property(TARGET testhdf5_fortran-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET testhdf5_fortran-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET testhdf5_fortran-shared APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (testhdf5_fortran-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -298,12 +313,15 @@ 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_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") +endif() set_target_properties (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -333,12 +351,15 @@ 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_property(TARGET testhdf5_fortran_1_8-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET testhdf5_fortran_1_8-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET testhdf5_fortran_1_8-shared APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (testhdf5_fortran_1_8-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -370,12 +391,15 @@ 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_property(TARGET fortranlib_test_F03 APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") +endif() set_target_properties (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -407,12 +431,15 @@ 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_property(TARGET fortranlib_test_F03-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET fortranlib_test_F03-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET fortranlib_test_F03-shared APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (fortranlib_test_F03-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -435,12 +462,15 @@ 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_property(TARGET fflush1 APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET fflush1 APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") +endif() set_target_properties (fflush1 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -463,12 +493,15 @@ 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_property(TARGET fflush1-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET fflush1-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET fflush1-shared APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (fflush1-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -491,12 +524,15 @@ 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_property(TARGET fflush2 APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET fflush2 APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") +endif() set_target_properties (fflush2 PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran @@ -519,12 +555,15 @@ 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_property(TARGET fflush2-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET fflush2-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET fflush2-shared APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (fflush2-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/fortran diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 5ead405..c53f724 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_property(TARGET parallel_test APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET parallel_test APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") +endif() set_target_properties (parallel_test PROPERTIES FOLDER test/fortran LINKER_LANGUAGE Fortran diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index 97ddce8..bd33a19 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -20,12 +20,15 @@ foreach (example ${examples}) PRIVATE ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) - set_property(TARGET hl_f90_ex_${example} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> - ) - set_property(TARGET hl_f90_ex_${example} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> - ) +# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/hl/fortran diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 6aec901..310ed4f 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -22,9 +22,12 @@ if (WIN32 AND MSVC) set_target_properties (H5HL_buildiface PROPERTIES COMPILE_FLAGS "/MT") endif () endif () -set_property(TARGET H5HL_buildiface APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> -) +#set_property(TARGET H5HL_buildiface APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +if(MSVC) + set_property(TARGET H5HL_buildiface APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE") +endif() set_target_properties (H5HL_buildiface PROPERTIES LINKER_LANGUAGE Fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} @@ -166,12 +169,15 @@ target_link_libraries (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ) -set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> -) -set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> -) +#set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +#) +#set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +#) +if(MSVC) + set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") +endif() set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran @@ -204,18 +210,21 @@ if (BUILD_SHARED_LIBS) PRIVATE ${LINK_Fortran_LIBS} ) - set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> - ) - set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> - ) - set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL"> - ) - set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def"> - ) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL"> +# ) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def"> +# ) + if(MSVC) + set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS};-DLL;-DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") + endif() set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index d6d1ab0..496ea0e 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -25,12 +25,15 @@ macro (ADD_H5_FORTRAN_EXE file) PRIVATE ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ) - set_property(TARGET hl_f90_${file} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> - ) - set_property(TARGET hl_f90_${file} APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> - ) +# set_property(TARGET hl_f90_${file} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET hl_f90_${file} APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (hl_f90_${file} PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran @@ -50,12 +53,15 @@ macro (ADD_H5_FORTRAN_EXE file) PRIVATE ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ) - set_property(TARGET hl_f90_${file}-shared APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> - ) - set_property(TARGET hl_f90_${file}-shared APPEND_STRING PROPERTY - LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> - ) +# set_property(TARGET hl_f90_${file}-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# ) +# set_property(TARGET hl_f90_${file}-shared APPEND PROPERTY +# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}> +# ) + if(MSVC) + set_property(TARGET hl_f90_${file}-shared APPEND PROPERTY LINK_FLAGS "-SUBSYSTEM:CONSOLE;${WIN_LINK_FLAGS}") + endif() set_target_properties (hl_f90_${file}-shared PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran |