From 477737b7bfc5ae13136bf7980b55a3917ef6d38a Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 28 Jan 2025 04:18:20 +0100 Subject: load_cache: Add note about export() The export() command can be a better option when outside project can be adjusted in such way. --- Help/command/load_cache.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Help/command/load_cache.rst b/Help/command/load_cache.rst index d0a5657..86d1e85 100644 --- a/Help/command/load_cache.rst +++ b/Help/command/load_cache.rst @@ -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 ^^^^^^^^ -- cgit v0.12