fix(cmake): don't pass REQUIRED to find_dependency in package config - #1
Merged
Merged
Conversation
find_dependency() forwards the REQUIRED/QUIET-ness requested by the caller of find_package(); hard-coding REQUIRED defeats that. A consumer doing find_package(NekoThreadPool CONFIG QUIET) got a fatal error instead of a graceful -NOTFOUND when a transitive dependency was absent. Reported by a vcpkg maintainer in microsoft/vcpkg#53099.
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upstream fix for feedback a vcpkg maintainer gave while reviewing microsoft/vcpkg#53099:
NekoThreadPoolConfig.cmake.inhard-codedREQUIRED, sofind_package(NekoThreadPool CONFIG QUIET)raised a fatal error when NekoSchema was absent instead of returning a graceful-NOTFOUND, which is what aQUIETcaller expects.Change
find_dependency(NekoSchema REQUIRED)→find_dependency(NekoSchema)Verification
Built and installed into a local prefix, then configured a consumer project against the installed package:
find_package(NekoThreadPool CONFIG QUIET)NekoThreadPool_FOUND=0(was: fatal error)find_package(NekoThreadPool CONFIG REQUIRED)find_package(NekoThreadPool CONFIG REQUIRED)FOUND=1,VERSION=1.0.2The
REQUIRED+present case additionally compiled and linked a consumer againstNeko::ThreadPool. The pre-change config was re-tested to confirm it really did hard-fail theQUIETcaller.Version metadata is already consistent here —
project(NekoThreadPool VERSION 1.0.2)matches the packaged1.0.2.🤖 Generated with Claude Code
https://claude.ai/code/session_01WMgcdYggBJ6aMCuNXYbRZT
Generated by Claude Code