Skip to content

cmake: honour USE_STATGRAB - #263

Open
cruzzil wants to merge 1 commit into
asdf-format:mainfrom
cruzzil:use-statgrab
Open

cmake: honour USE_STATGRAB#263
cruzzil wants to merge 1 commit into
asdf-format:mainfrom
cruzzil:use-statgrab

Conversation

@cruzzil

@cruzzil cruzzil commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #262.

USE_STATGRAB was declared but never consulted, so pkg_check_modules(STATGRAB libstatgrab REQUIRED) ran regardless and -DUSE_STATGRAB=OFF could not turn it off. On platforms where libstatgrab is not packaged, configure failed with no way out.

HAVE_STATGRAB already follows STATGRAB_FOUND, which stays unset on the new path, so the source needs no change.

Checked both ways on Linux: OFF skips the probe, builds, 22/22 tests; the default still finds 0.92.1, builds, 22/22.

The option was declared but never consulted, so the REQUIRED pkg-config
check ran regardless and configure failed where libstatgrab is not
packaged, with no way to opt out.

The code already treats it as optional: HAVE_STATGRAB follows
STATGRAB_FOUND, which stays unset on this path.

Fixes asdf-format#262.
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.

USE_STATGRAB=OFF does not turn libstatgrab off

1 participant