Files
hdf5/config
H. Joe LeeandClaude Opus 5 61fbe139e8 Solaris: only pass SunPro -erroff to SunPro compilers (#6570)
On SunOS the C and C++ flag files appended the single string
"-erroff=%none -DBSD_COMP" to HDF5_CMAKE_C/CXX_FLAGS. Because that is one
list element, target_compile_options() hands it to the compiler as one
argument, and -erroff is an Oracle Developer Studio option to begin with.
gcc silently ignores the result (it parses the leading -e as the linker
entry-symbol option), but clang errors out:

  clang: error: unknown argument: '-erroff=%none -DBSD_COMP'

which breaks the build on the first object file. As a side effect,
-DBSD_COMP was never actually reaching the compiler as a define.

Emit -erroff=%none only for SunPro, and append -DBSD_COMP as its own list
element so it is passed as a separate argument on all Solaris compilers.

Fixes #6569

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 14:57:23 -05:00
..
2026-03-16 17:10:34 -05:00

The config directory

Intro

HDF5 can be configured using CMake.

Configuration information for the HDF5 library and tools is specific to the repository folders. Each subdirectory of the project has its own CMake build and test files. Basic library configuration will generally be found in the root's CMakeLists.txt with support for macros and settings in this config directory.

This directory contains a few important things:

  • Support files for optional components (in cmake)
  • Compiler and platform parameters (in flags)
  • Warning files (in *-warnings directories)
  • Toolchain files (in toolchain)
  • Sanitizer files (in sanitizer)
  • Example install scripts (in examples)
  • Installation support files (in install)

CMake is documented in the following files in the docs/ directory: