load_cache: Add note about export()

The export() command can be a better option when outside project can be
adjusted in such way.
This commit is contained in:
Peter Kokot 2025-01-28 04:18:20 +01:00
parent aeff709a27
commit 477737b7bf
No known key found for this signature in database
GPG Key ID: A94800907AA79B36

View File

@ -47,6 +47,15 @@ provided for backward compatibility:
This signature can be used only in CMake projects. Script mode is not
supported.
.. note::
Instead of loading the outside project's cache file and manually accessing
variables, a more robust and convenient approach is to use the
:command:`export` command in the outside project, when available. This allows
the project to provide its targets, configuration, or features in a
structured and maintainable way, making integration simpler and less
error-prone.
Examples
^^^^^^^^