mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
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>