Skip to content

fix: Add explicit dependency checks for optional components#29

Merged
Jo5ta merged 3 commits intomainfrom
fix/add-cmake-dependency-checks
Apr 28, 2026
Merged

fix: Add explicit dependency checks for optional components#29
Jo5ta merged 3 commits intomainfrom
fix/add-cmake-dependency-checks

Conversation

@eyebeem-mikel
Copy link
Copy Markdown
Collaborator

Summary

Add early CMake dependency validation for optional components to provide clear error messages when required packages are missing.

Changes

  • snapshot_library: Check for libarchive-devel before building
  • command_line_tool: Check for rapidjson-devel before building
  • cpp decoder: Check for boost-devel before building

Each check provides an actionable error message with the CMake flag to disable the component if the dependency cannot be installed (e.g., -DCLLTK_SNAPSHOT=OFF).

Benefits

  • Prevents cryptic build failures later in the build process
  • Provides clear, actionable error messages to users
  • Aligns with the Gradle build system's component enable/disable flags
  • Improves developer experience when building in environments with missing dependencies

Testing

The changes can be tested by:

  1. Building with all dependencies present (should work as before)
  2. Building with a missing dependency (should fail early with clear message)
  3. Building with component disabled via CMake flag (should skip the component)

Relates to the CommonLowLevelTracingKit_build Gradle integration work.

Add early CMake dependency validation for optional components to provide
clear error messages when required packages are missing:

- snapshot_library: Check for libarchive-devel
- command_line_tool: Check for rapidjson-devel
- cpp decoder: Check for boost-devel

Each check provides actionable error message with the CMake flag to
disable the component if the dependency cannot be installed.

This prevents cryptic build failures later in the build process and
aligns with the Gradle build system's component enable/disable flags.

Signed-off-by: Martin Andres <mandres@de.ibm.com>
Signed-off-by: Michael Andres <michael.andres@ibm.com>
@eyebeem-mikel eyebeem-mikel force-pushed the fix/add-cmake-dependency-checks branch from 4fa6f03 to ab2e357 Compare April 28, 2026 11:33
Prevent CPack from automatically generating source RPMs (ibmsource RPMs)
during normal package builds. Source RPMs can still be built explicitly
via the 'srpm' custom target when needed.

This reduces build artifacts and aligns with typical RPM packaging
workflows where source RPMs are only generated on demand.

Signed-off-by: Michael Andres <michael.andres@ibm.com>
Bump version for PR #29 changes:
- Add explicit dependency checks for optional components
- Disable automatic source RPM generation
- Prevent cryptic build failures when dependencies are missing

Signed-off-by: Michael Andres <michael.andres@ibm.com>
@Jo5ta Jo5ta merged commit 1fa19d2 into main Apr 28, 2026
5 checks passed
@Jo5ta Jo5ta deleted the fix/add-cmake-dependency-checks branch April 28, 2026 13:51
@eyebeem-mikel eyebeem-mikel restored the fix/add-cmake-dependency-checks branch April 29, 2026 07:41
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