diff options
Diffstat (limited to 'hl')
-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 |
3 files changed, 57 insertions, 39 deletions
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 |