[POC] Preparing multi-file CMakeConfigDeps#20036
Draft
franramirez688 wants to merge 8 commits into
Draft
Conversation
memsharded
reviewed
May 29, 2026
| return textwrap.dedent("""\ | ||
| include_guard() | ||
| message(STATUS "Conan: Configuring Targets for {{ ref }}") | ||
| message(STATUS "Conan: Configuring Targets for {{ filename }}") |
Member
There was a problem hiding this comment.
Suggested change
| message(STATUS "Conan: Configuring Targets for {{ filename }}") | |
| message(STATUS "Conan: Configuring Targets for {{ self._filename }}") |
| raise ConanException(f"Unknown cmake_config_version_compat={policy} in {self._conanfile}") | ||
| version = self._cmakedeps.get_property("system_package_version", self._conanfile) | ||
| version = version or self._conanfile.ref.version | ||
| raise ConanException(f"Unknown cmake_config_version_compat={policy} in {self.filename}") |
Member
There was a problem hiding this comment.
If this filename is not the same as a package name, it can be complicated to know it.
I suggest:
- Pass the
refinstead of the version. - Use the
refhere - Use the
ref.versionbelow
| foo-config.cmake | ||
| """ | ||
| def __init__(self, cmakedeps, require, conanfile, full_cpp_info): | ||
| def __init__(self, filename, cmakedeps, conanfile, full_cpp_info, cmake_config_properties, |
Member
There was a problem hiding this comment.
This cmakedeps shouldn't be used anymore? It could be dropped from the parameterization, as it gives access to the global state.
With conanfile is different, as it is still used in places like pkg_name = self._conanfile.ref.name, but for this reason I think it is still necessary to do it, what will be the meaning of that pkg_name when we go and try to implement the "multi-file" feature?
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.
Changelog: omit
Docs: omit