Skip to content

cmake: expose hdf5 target as SZ3::hdf5sz3 in build and export - #128

Merged
ayzk merged 1 commit into
masterfrom
codex/hdf5sz3-namespaced-target
Mar 2, 2026
Merged

ayzk merged 1 commit into
masterfrom
codex/hdf5sz3-namespaced-target

Conversation

@ayzk

@ayzk ayzk commented Mar 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add in-tree alias target SZ3::hdf5sz3 for FetchContent/build-tree consumers
  • export hdf5sz3 with NAMESPACE SZ3:: in HDF5SZ3.cmake

Verification

  • built test1 (FetchContent)
  • built/install SZ3 with -DBUILD_H5Z_FILTER=ON
  • built test2 (find_package) against installed package

Copilot AI review requested due to automatic review settings March 2, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to make the HDF5 filter target available under a consistent SZ3:: namespaced name for both in-tree (FetchContent/add_subdirectory) and exported/build-tree usage, aligning it with how SZ3 exports targets for find_package.

Changes:

  • Add an in-tree alias target SZ3::hdf5sz3 for build-tree consumers.
  • Add NAMESPACE SZ3:: to the build-tree export(TARGETS ...) call so the exported target name matches the installed/exported naming.
Comments suppressed due to low confidence (1)

tools/H5Z-SZ3/CMakeLists.txt:19

  • hdf5sz3 links against the in-tree target SZ3, but after installation the SZ3 target is exported under the SZ3:: namespace (i.e., consumers will have SZ3::SZ3, not SZ3). This can make the installed SZ3::hdf5sz3 imported target reference a non-existent dependency (or fall back to -lSZ3, which is wrong for an INTERFACE library). Update the link interface to use the exported name (and add an in-tree ALIAS for SZ3::SZ3 if needed for build-tree/FetchContent usage) so installed and in-tree consumers behave consistently.
add_library(SZ3::hdf5sz3 ALIAS hdf5sz3)

target_link_libraries(hdf5sz3
        PUBLIC SZ3 HDF5::HDF5
)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ayzk
ayzk merged commit 34b36f2 into master Mar 2, 2026
17 checks passed
ayzk added a commit that referenced this pull request Apr 26, 2026
Brings in upstream changes that don't touch docs/:

  * HDF5 target export improvements (#125, #126, #128)
    - SZ3::hdf5sz3 target now exposed in build + export trees
    - Cleanups in tools/H5Z-SZ3, mdz, sz3c CMakeLists
  * NixOS support: new default.nix (#129)
  * Lorenzo predictor pointer-arith UB fix (#121)
    - LorenzoPredictor.hpp + QuantOptimization.hpp:
      d[-i] -> *(d - i) to avoid size_t unsigned wrap-around

.gitignore: union merge (master adds sz3_install / sz3_build / test;
fz keeps tmp / .cache / docs/site/html / .claude).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ayzk
ayzk deleted the codex/hdf5sz3-namespaced-target branch September 18, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants