-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes Fortran compilation on Windows #3839
Conversation
Need to resolve subfiling DLLs when parallel is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The add_library changes are the only ones that need to be fixed.
if(MSVC) | ||
set(DLLDEF ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def) | ||
endif() | ||
add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${DLLDEF} ${f90_F_SOURCES_SHARED}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relies on "DLLDEF" not being defined for non-msvc. I would prefer that we use an if/else here and in the other file. The other question and maybe why the other form did not work - should we check for it being on windows "if (WIN32) " instead of "if (MSVC)" - because those are not the same thing. (Another choice is "if (WINDOWS)")
# 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe MSVC should be WIN32? OR maybe the commented out property commands might work now?
Replaced with PR #3836 |
Fixes unresolved symbols with Fortran libraries on Windows with Intel OneAPI.