浏览代码

load_cache: Add note about export()

The export() command can be a better option when outside project can be
adjusted in such way.
Peter Kokot 9 月之前
父节点
当前提交
477737b7bf
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      Help/command/load_cache.rst

+ 9 - 0
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
   This signature can be used only in CMake projects.  Script mode is not
   supported.
   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
 Examples
 ^^^^^^^^
 ^^^^^^^^