Skip to content

Commit

Permalink
Merge branch 'HDFGroup:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bmribler authored Feb 7, 2024
2 parents 62c6970 + fd4e9db commit cb8f7ef
Show file tree
Hide file tree
Showing 82 changed files with 1,230 additions and 3,512 deletions.
3 changes: 1 addition & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BraceWrapping:
BreakBeforeBraces: Stroustrup
BreakAfterJavaFieldAnnotations: true
BreakStringLiterals: true
ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
ColumnLimit: 110
IndentWidth: 4
---
Language: Cpp
Expand All @@ -24,7 +24,6 @@ AllowShortFunctionsOnASingleLine: None
AlwaysBreakAfterReturnType: AllDefinitions
# Can enable the following section when llvm 12.x is out
#AttributeMacros:
ForEachMacros: ['ALL_MEMBERS', 'UNIQUE_MEMBERS']
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 3
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,10 @@ permissions:
# in parallel. We just have one job, but the matrix items defined below will
# run in parallel.
jobs:
call-workflow-xdr-autotools:
name: "Autotools XDR Workflows"
uses: ./.github/workflows/main-auto.yml
with:
xdr: enable
netcdf: enable
shared: enable
build_mode: "production"

call-system-xdr-autotools:
name: "Autotools System XDR Workflows"
uses: ./.github/workflows/main-auto.yml
with:
xdr: disable
netcdf: enable
shared: enable
build_mode: "production"

call-debug-netcdf-autotools:
name: "Autotools Debug NetCDF Workflows"
uses: ./.github/workflows/main-auto.yml
with:
xdr: enable
netcdf: enable
shared: enable
build_mode: "debug"
Expand All @@ -42,7 +23,6 @@ jobs:
name: "Autotools Release NetCDF Workflows"
uses: ./.github/workflows/main-auto.yml
with:
xdr: enable
netcdf: enable
shared: enable
build_mode: "production"
Expand All @@ -52,7 +32,6 @@ jobs:
uses: ./.github/workflows/main-auto.yml
with:
netcdf: disable
xdr: enable
shared: disable
build_mode: "debug"

Expand All @@ -61,7 +40,6 @@ jobs:
uses: ./.github/workflows/main-auto.yml
with:
netcdf: disable
xdr: enable
shared: disable
build_mode: "production"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master
with:
skip: ./config/sanitizer/sanitizers.cmake,./hdf/util/testfiles/*.raw,./hdf/util/testfiles/head.r8,./mfhdf/ncdump/*,./mfhdf/ncgen/*,./mfhdf/nctest/*,./mfhdf/xdr/*,./mfhdf/README,./mfhdf/THANKS,./mfhdf/FAQ
skip: ./config/sanitizer/sanitizers.cmake,./hdf/util/testfiles/*.raw,./hdf/util/testfiles/head.r8,./mfhdf/ncdump/*,./mfhdf/ncgen/*,./mfhdf/nctest/*,./mfhdf/README,./mfhdf/THANKS,./mfhdf/FAQ
ignore_words_list: acount,anid,ans,clude,isnt,inout,fo,msdos,nam,nd,pres,sav,shs,siz,varn,vlone
2 changes: 1 addition & 1 deletion .github/workflows/hdfeos2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install HDF4
run: |
./autogen.sh
./configure --prefix=/usr/local --enable-shared --enable-hdf4-xdr -disable-fortran --disable-netcdf
./configure --prefix=/usr/local --enable-shared --disable-fortran --disable-netcdf
make
sudo make install
- name: Install HDF-EOS2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/intel-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
--enable-build-mode=${{ inputs.build_mode }} \
--enable-netcdf \
--enable-shared \
--enable-hdf4-xdr \
--disable-fortran
# BUILD
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/main-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ on:
description: "netcdf enable/disable"
required: true
type: string
xdr:
description: "xdr enable/disable(system)"
required: true
type: string

permissions:
contents: read
Expand All @@ -33,7 +29,7 @@ jobs:
# Linux (Ubuntu) w/ gcc + Autotools
#
Autotools_build_and_test:
name: "GCC-${{ inputs.build_mode }}-NC=${{ inputs.netcdf }}d-XDR=${{ inputs.xdr }}d"
name: "GCC-${{ inputs.build_mode }}-NC=${{ inputs.netcdf }}d"
# Don't run the action if the commit message says to skip CI
if: "!contains(github.event.head_commit.message, 'skip-ci')"

Expand Down Expand Up @@ -64,7 +60,6 @@ jobs:
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure \
--enable-build-mode=${{ inputs.build_mode }} \
--${{ inputs.xdr }}-hdf4-xdr \
--${{ inputs.netcdf }}-netcdf \
--disable-fortran \
--${{ inputs.shared }}-java \
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/main-cmake-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ jobs:
-DBUILD_SHARED_LIBS:BOOL=${{ inputs.shared }} \
-DHDF4_BUILD_EXAMPLES:BOOL=ON \
-DBUILD_JPEG_WITH_PIC:BOOL=ON \
-DHDF4_BUILD_XDR_LIB:BOOL=ON \
-DHDF4_ENABLE_NETCDF:BOOL=${{ inputs.netcdf }} \
-DHDF4_BUILD_FORTRAN:BOOL=OFF \
-DHDF4_BUILD_JAVA:BOOL=OFF \
Expand Down Expand Up @@ -104,4 +103,4 @@ jobs:
- name: List files in the space
run: |
ls -l ${{ runner.workspace }}/build
6 changes: 1 addition & 5 deletions .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
- name: "Windows MSVC"
os: windows-latest
toolchain: ""
xdr: ON
fortran: OFF
java: ON
docs: ON
Expand All @@ -69,7 +68,6 @@ jobs:
# so it's not critical
- name: "Ubuntu gcc"
os: ubuntu-latest
xdr: ON
fortran: OFF
java: ON
docs: ON
Expand All @@ -88,7 +86,6 @@ jobs:
# but that seems unnecessary
- name: "MacOS Clang"
os: macos-13
xdr: ON
fortran: OFF
java: ON
docs: ON
Expand Down Expand Up @@ -168,7 +165,6 @@ jobs:
-DBUILD_SHARED_LIBS:BOOL=${{ inputs.shared }} \
-DHDF4_BUILD_EXAMPLES:BOOL=ON \
-DBUILD_JPEG_WITH_PIC:BOOL=ON \
-DHDF4_BUILD_XDR_LIB:BOOL=${{ matrix.xdr }} \
-DHDF4_ENABLE_NETCDF:BOOL=${{ inputs.netcdf }} \
-DHDF4_BUILD_FORTRAN:BOOL=${{ matrix.fortran }} \
-DHDF4_BUILD_JAVA:BOOL=${{ env.useJava }} \
Expand Down Expand Up @@ -231,4 +227,4 @@ jobs:
path: ${{ runner.workspace }}/build/HDF-*-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'macos-13') && (inputs.netcdf == 'true') && (inputs.shared == 'true') }}


2 changes: 0 additions & 2 deletions .github/workflows/ppc64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
cd "build"
../configure \
--enable-build-mode=production \
--enable-hdf4-xdr \
--enable-netcdf \
--disable-fortran \
--disable-java \
Expand Down Expand Up @@ -91,7 +90,6 @@ jobs:
-DBUILD_SHARED_LIBS:BOOL=ON \
-DHDF4_BUILD_EXAMPLES=ON \
-DBUILD_JPEG_WITH_PIC:BOOL=ON \
-DHDF4_BUILD_XDR_LIB:BOOL=ON \
-DHDF4_ENABLE_NETCDF:BOOL=ON \
-DHDF4_BUILD_FORTRAN=OFF \
-DHDF4_BUILD_JAVA=OFF \
Expand Down
1 change: 0 additions & 1 deletion CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ endif ()
set (HDF4_INCLUDES_BUILD_TIME
${HDF4_HDF_SOURCE_DIR}
${HDF4_MFHDF_SOURCE_DIR}
${HDF4_MFHDF_XDR_DIR}
${HDF4_BINARY_DIR}
)

Expand Down
41 changes: 0 additions & 41 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ set (HDF4_SRC_LIB_CORENAME "hdf")
set (HDF4_SRC_FCSTUB_LIB_CORENAME "hdf_fcstub")
set (HDF4_SRC_FORTRAN_LIB_CORENAME "hdf_fortran")
set (HDF4_MF_LIB_CORENAME "mfhdf")
set (HDF4_MF_XDR_LIB_CORENAME "xdr")
set (HDF4_HDF_TEST_LIB_CORENAME "hdf_test")
set (HDF4_HDF_TEST_FCSTUB_LIB_CORENAME "hdf_test_fcstub")
set (HDF4_MF_FCSTUB_LIB_CORENAME "mfhdf_fcstub")
Expand All @@ -170,7 +169,6 @@ set (HDF4_SRC_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_SRC_LIB_COREN
set (HDF4_SRC_FCSTUB_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_SRC_FCSTUB_LIB_CORENAME}")
set (HDF4_SRC_FORTRAN_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_SRC_FORTRAN_LIB_CORENAME}")
set (HDF4_MF_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_MF_LIB_CORENAME}")
set (HDF4_MF_XDR_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_MF_XDR_LIB_CORENAME}")
set (HDF4_HDF_TEST_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_HDF_TEST_LIB_CORENAME}")
set (HDF4_HDF_TEST_FCSTUB_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_HDF_TEST_FCSTUB_LIB_CORENAME}")
set (HDF4_MF_FCSTUB_LIB_NAME "${HDF4_EXTERNAL_LIB_PREFIX}${HDF4_MF_FCSTUB_LIB_CORENAME}")
Expand All @@ -188,7 +186,6 @@ set (HDF4_SRC_LIB_TARGET "${HDF4_SRC_LIB_CORENAME}-static")
set (HDF4_SRC_FCSTUB_LIB_TARGET "${HDF4_SRC_FCSTUB_LIB_CORENAME}-static")
set (HDF4_SRC_FORTRAN_LIB_TARGET "${HDF4_SRC_FORTRAN_LIB_CORENAME}-static")
set (HDF4_MF_LIB_TARGET "${HDF4_MF_LIB_CORENAME}-static")
set (HDF4_MF_XDR_LIB_TARGET "${HDF4_MF_XDR_LIB_CORENAME}-static")
set (HDF4_HDF_TEST_LIB_TARGET "${HDF4_HDF_TEST_LIB_CORENAME}-static")
set (HDF4_HDF_TEST_FCSTUB_LIB_TARGET "${HDF4_HDF_TEST_FCSTUB_LIB_CORENAME}-static")
set (HDF4_MF_FCSTUB_LIB_TARGET "${HDF4_MF_FCSTUB_LIB_CORENAME}-static")
Expand All @@ -202,7 +199,6 @@ set (HDF4_SRC_LIBSH_TARGET "${HDF4_SRC_LIB_CORENAME}-shared")
set (HDF4_SRC_FCSTUB_LIBSH_TARGET "${HDF4_SRC_FCSTUB_LIB_CORENAME}-shared")
set (HDF4_SRC_FORTRAN_LIBSH_TARGET "${HDF4_SRC_FORTRAN_LIB_CORENAME}-shared")
set (HDF4_MF_LIBSH_TARGET "${HDF4_MF_LIB_CORENAME}-shared")
set (HDF4_MF_XDR_LIBSH_TARGET "${HDF4_MF_XDR_LIB_CORENAME}-shared")
set (HDF4_MF_FCSTUB_LIBSH_TARGET "${HDF4_MF_FCSTUB_LIB_CORENAME}-shared")
set (HDF4_MF_FORTRAN_LIBSH_TARGET "${HDF4_MF_FORTRAN_LIB_CORENAME}-shared")
set (HDF4_TOOLS_LIBSH_TARGET "${HDF4_TOOLS_LIB_CORENAME}-shared")
Expand All @@ -218,7 +214,6 @@ set (HDF4_MFHDFSOURCE_DIR ${HDF4_SOURCE_DIR}/mfhdf/libsrc)
set (HDF4_MFHDF_TEST_DIR ${HDF4_SOURCE_DIR}/mfhdf/test)
set (HDF4_MFHDF_UTIL_DIR ${HDF4_SOURCE_DIR}/mfhdf/util)
set (HDF4_MFHDF_FORTRAN_DIR ${HDF4_SOURCE_DIR}/mfhdf/fortran)
set (HDF4_MFHDF_XDR_DIR ${HDF4_SOURCE_DIR}/mfhdf/xdr)
set (HDF4_JAVA_JNI_SRC_DIR ${HDF4_SOURCE_DIR}/java/src/jni)
set (HDF4_JAVA_HDF_SRC_DIR ${HDF4_SOURCE_DIR}/java/src/hdf)
set (HDF4_JAVA_TEST_SRC_DIR ${HDF4_SOURCE_DIR}/java/test)
Expand Down Expand Up @@ -472,48 +467,12 @@ if (HDF4_ENABLE_NETCDF)
set (${HDF_PREFIX}_BUILD_NETCDF 1)
endif ()

#-----------------------------------------------------------------------------
# Option to build HDF4 xdr Library
#-----------------------------------------------------------------------------
option (HDF4_BUILD_XDR_LIB "Build HDF4 XDR Library" OFF)
if (WIN32 OR MINGW OR APPLE)
set (HDF4_BUILD_XDR_LIB ON CACHE BOOL "Build HDF4 XDR Library" FORCE)
else ()
if (NOT HDF4_BUILD_XDR_LIB)
include (FindXDR)
if (XDR_FOUND)
set (CMAKE_REQUIRED_LIBRARIES "${XDR_LIBRARIES}" )
message (STATUS "HDF4 XDR Library found: ${XDR_LIBRARIES}")
set (LINK_LIBS ${LINK_LIBS} ${XDR_LIBRARIES})
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${XDR_LIBRARIES})
include_directories(${XDR_INCLUDE_DIRS})
else ()
set (HDF4_BUILD_XDR_LIB ON CACHE BOOL "Build HDF4 XDR Library" FORCE)
message (STATUS "HDF4 XDR Library will be built")
endif ()
endif ()
endif ()

if (HDF4_BUILD_XDR_LIB)
set (H4_NO_SYS_XDR_INC 1)
add_subdirectory (mfhdf/xdr)
endif ()

#-----------------------------------------------------------------------------
# Add the HDF4 Library Target to the build
#-----------------------------------------------------------------------------
add_subdirectory (hdf/src)
add_subdirectory (mfhdf/libsrc)

if (HDF4_BUILD_XDR_LIB)
if (NOT ONLY_SHARED_LIBS)
add_dependencies (${HDF4_MF_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET})
endif ()
if (BUILD_SHARED_LIBS)
add_dependencies (${HDF4_MF_LIBSH_TARGET} ${HDF4_MF_XDR_LIBSH_TARGET})
endif ()
endif ()

#-----------------------------------------------------------------------------
# Option to build documentation
#-----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"inherits": ["ci-StdCompression", "ci-StdExamples"],
"cacheVariables": {
"HDF_PACKAGE_NAMESPACE": {"type": "STRING", "value": "hdf4::"},
"HDF4_BUILD_XDR_LIB": "ON",
"HDF4_BUILD_GENERATORS": "ON",
"HDF4_ENABLE_ALL_WARNINGS": "ON",
"HDF4_MINGW_STATIC_GCC_LIBS": "ON"
Expand Down
19 changes: 3 additions & 16 deletions config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ macro (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
endmacro ()

# ----------------------------------------------------------------------
# WINDOWS Hard code Values
# WINDOWS hard-coded values
# ----------------------------------------------------------------------
set (WINDOWS)

Expand All @@ -64,7 +64,7 @@ if (WIN32 AND NOT MINGW)
endif ()

if (WINDOWS)
set (HDF4_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
set (${HDF_PREFIX}_HAVE_WIN32_API 1)
set (${HDF_PREFIX}_HAVE_LIBM 1)
set (${HDF_PREFIX}_HAVE_STRDUP 1)
Expand All @@ -85,7 +85,7 @@ if (WINDOWS)
endif ()

# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
# END of WINDOWS hard-coded values
# ----------------------------------------------------------------------

if (NOT WINDOWS)
Expand Down Expand Up @@ -451,19 +451,6 @@ CHECK_FUNCTION_EXISTS (asprintf ${HDF_PREFIX}_HAVE_ASPRINTF)
CHECK_FUNCTION_EXISTS (vasprintf ${HDF_PREFIX}_HAVE_VASPRINTF)
CHECK_FUNCTION_EXISTS (waitpid ${HDF_PREFIX}_HAVE_WAITPID)

if (NOT WINDOWS)
CHECK_FUNCTION_EXISTS (ntohl ${HDF_PREFIX}_HAVE_NTOHL)
CHECK_FUNCTION_EXISTS (htonl ${HDF_PREFIX}_HAVE_HTONL)
CHECK_FUNCTION_EXISTS (ntohs ${HDF_PREFIX}_HAVE_NTOHS)
CHECK_FUNCTION_EXISTS (htons ${HDF_PREFIX}_HAVE_HTONS)
else ()
set (CMAKE_REQUIRED_LIBRARIES "ws2_32")
check_symbol_exists (ntohl "winsock2.h" ${HDF_PREFIX}_HAVE_NTOHL)
check_symbol_exists (htonl "winsock2.h" ${HDF_PREFIX}_HAVE_HTONL)
check_symbol_exists (ntohs "winsock2.h" ${HDF_PREFIX}_HAVE_NTOHS)
check_symbol_exists (htons "winsock2.h" ${HDF_PREFIX}_HAVE_HTONS)
endif ()

#-----------------------------------------------------------------------------
# Check how to print a Long Long integer
#-----------------------------------------------------------------------------
Expand Down
47 changes: 0 additions & 47 deletions config/cmake/FindXDR.cmake

This file was deleted.

Loading

0 comments on commit cb8f7ef

Please sign in to comment.