mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Scope Safety: Refactored parse_hdf5_version from a Macro to a Function to prevent variable namespace pollution. Implemented a helper macro (_parse_version_component) to handle repetitive regex logic, significantly reducing code size and complexity. Updated HDF5config.cmake to calculate paths dynamically using REALPATH relative to CMAKE_CURRENT_LIST_FILE, fixing issues with symlinks and execution context. Decoupled the parsing logic from scope promotion; the helper now parses to a local variable, and the function explicitly handles the PARENT_SCOPE assignment.