diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-11-10 13:36:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 13:36:46 (GMT) |
commit | 66786fa036fa6da86c56725808c3d82d48a89b0e (patch) | |
tree | 5de41a8e066d52c2b9eee37a3d6e258728f73df5 /fortran/src/CMakeLists.txt | |
parent | e0d095ebf020706ec7d7c82e6674b18f1a0a2d5b (diff) | |
download | hdf5-66786fa036fa6da86c56725808c3d82d48a89b0e.zip hdf5-66786fa036fa6da86c56725808c3d82d48a89b0e.tar.gz hdf5-66786fa036fa6da86c56725808c3d82d48a89b0e.tar.bz2 |
Add intel oneapi windows build to CI CMake (#3836)
Diffstat (limited to 'fortran/src/CMakeLists.txt')
-rw-r--r-- | fortran/src/CMakeLists.txt | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 57e17e5..d054503 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -9,12 +9,15 @@ if (WIN32) if (NOT H5_HAVE_PARALLEL) set (H5_NOPAREXP ";") endif () + set (H5_NOSUBFILING ";") # Subfiling is not supported on Windows set (H5_F03EXP ";") if (NOT H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE) set (H5_DBL_NOT_UNIQUE_EXP ";") endif () + set (CMAKE_NO_DEPRECATED_SYMBOLS 0) if (NOT H5_NO_DEPRECATED_SYMBOLS) - set (H5_NO_DEPRECATED_SYMBOLS ";") + set (CMAKE_NO_DEPRECATED_SYMBOLS 1) + set (DLL_NO_DEPRECATED_SYMBOLS ";") endif () configure_file (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY) endif () @@ -25,8 +28,12 @@ endif () # Define Parallel variable for passing to H5config_f.inc.cmake set (CMAKE_H5_HAVE_PARALLEL 0) +set (CMAKE_H5_HAVE_SUBFILING_VFD 0) if (H5_HAVE_PARALLEL) set (CMAKE_H5_HAVE_PARALLEL 1) + if (H5_HAVE_SUBFILING_VFD) + set (CMAKE_H5_HAVE_SUBFILING_VFD 1) + endif () endif () set (CMAKE_H5_HAVE_FLOAT128 0) @@ -341,8 +348,6 @@ if (BUILD_STATIC_LIBS) ${LINK_Fortran_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>" ) -# 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} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -358,7 +363,12 @@ if (BUILD_STATIC_LIBS) endif () if (BUILD_SHARED_LIBS) - add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SOURCES_SHARED}) + if(WIN32) + set(DLLDEF ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def) + else() + set(DLLDEF "") + endif() + add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${DLLDEF} ${f90_F_SOURCES_SHARED}) target_include_directories (${HDF5_F90_LIBSH_TARGET} PRIVATE "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${HDF5_INSTALL_MODULE_DIR}/shared>" @@ -374,12 +384,8 @@ if (BUILD_SHARED_LIBS) PUBLIC ${HDF5_F90_C_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>" ) -# 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} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} /DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") + set_property(TARGET ${HDF5_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES FOLDER libraries/fortran |