diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-05-02 20:15:13 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-05-02 20:15:13 (GMT) |
commit | d3a49988eb82bd44cfb426014e99952a3de6c823 (patch) | |
tree | 6e993d369e0cb9766464e638eb78c660d4a9f4fc /fortran | |
parent | 0c77fbaeb90b6b1e97b219c8176f8a02f2b57655 (diff) | |
download | hdf5-d3a49988eb82bd44cfb426014e99952a3de6c823.zip hdf5-d3a49988eb82bd44cfb426014e99952a3de6c823.tar.gz hdf5-d3a49988eb82bd44cfb426014e99952a3de6c823.tar.bz2 |
Refactor link flags
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/CMakeLists.txt | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c36487f..f21a9ba 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -259,15 +259,16 @@ target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} PRIVATE - ${LINK_Fortran_LIBS} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}> + ${LINK_Fortran_LIBS} + $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}> + INTERFACE + $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> + $<$<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}") @@ -295,15 +296,16 @@ if (BUILD_SHARED_LIBS) ${HDF5_F90_C_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}> -- ) + INTERFACE + $<$<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_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 -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") |