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 /hl/fortran | |
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 'hl/fortran')
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 18 | ||||
-rw-r--r-- | hl/fortran/src/H5LTff.F90 | 14 |
2 files changed, 14 insertions, 18 deletions
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index ed469e5..f225eb8 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -22,9 +22,6 @@ if (WIN32 AND MSVC) set_target_properties (H5HL_buildiface PROPERTIES COMPILE_FLAGS "/MT") endif () endif () -#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 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE") endif() @@ -182,8 +179,6 @@ if (BUILD_STATIC_LIBS) PRIVATE "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_COMPILE_FLAGS}>" ) 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 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} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -198,7 +193,12 @@ if (BUILD_STATIC_LIBS) add_dependencies(${HDF5_HL_F90_LIB_TARGET} H5HLgen) endif () if (BUILD_SHARED_LIBS) - add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SOURCES_SHARED}) + if(WIN32) + set(DLLDEF ${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def) + else() + set(DLLDEF "") + endif() + add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${DLLDEF} ${HDF5_HL_F90_F_SOURCES_SHARED}) target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PRIVATE "${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${HDF5_INSTALL_MODULE_DIR}/shared>" @@ -214,12 +214,8 @@ if (BUILD_SHARED_LIBS) PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS} ) -# 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} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} -DLL -DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") + set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl/fortran diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 8b4e6d3..80e9fe7 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -1115,7 +1115,7 @@ CONTAINS f_ptr = C_LOC(buf(1:1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf(1)) @@ -1165,7 +1165,7 @@ CONTAINS INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf(1)) @@ -1216,7 +1216,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf(1)) @@ -1264,7 +1264,7 @@ CONTAINS f_ptr = C_LOC(buf(1)(1:1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf_type = STORAGE_SIZE(buf(1)(1:1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf_type = SIZEOF(buf(1:1)(1:1)) @@ -1363,7 +1363,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf = SIZEOF(buf(1)) @@ -1407,7 +1407,7 @@ CONTAINS INTEGER(size_t) :: SizeOf_buf f_ptr = C_LOC(buf(1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf = SIZEOF(buf(1)) @@ -1451,7 +1451,7 @@ CONTAINS INTEGER(size_t) :: SizeOf_buf f_ptr = C_LOC(buf(1)) -#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0 +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else SizeOf_buf = SIZEOF(buf(1)) |