Skip to content

Preset includes should be loaded relative to the include'ing file#87

Merged
MarkSchofield merged 1 commit intodevelopfrom
mschofie/relative-preset-includes
Dec 24, 2025
Merged

Preset includes should be loaded relative to the include'ing file#87
MarkSchofield merged 1 commit intodevelopfrom
mschofie/relative-preset-includes

Conversation

@MarkSchofield
Copy link
Owner

Fixes #86.

When loading 'include' presets, relative paths should be loaded relative to the include'ing file. This manifests when building with a CMakePresets.json with includes, but building from a sub-folder - the include is - incorrectly - resolved relative to the sub-folder.

The fix reshuffles a little. There already was validation that the included file was present, but that happened when processing the include, not when loading the include from the file. In order to have the root folder to load from, work to resolve and validate the include is performed when loading from the file.

@MarkSchofield MarkSchofield merged commit dc94319 into develop Dec 24, 2025
1 check passed
@MarkSchofield MarkSchofield deleted the mschofie/relative-preset-includes branch December 24, 2025 17:31
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.

PSCMake loads preset includes relative to the current location, rather than relative to the CMake root

1 participant