summaryrefslogtreecommitdiffstats
path: root/Help/command/file.rst
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2017-04-08 21:21:40 (GMT)
committerBrad King <brad.king@kitware.com>2017-04-10 13:58:22 (GMT)
commitd039f7414f9acc28ad1e51e775e888688f51a706 (patch)
treee0c7dd7f3d1c3b21e30ffba9d6943bae0ed9650d /Help/command/file.rst
parent18eeed41948b265168497ea3360e7b0d56e8e8a9 (diff)
downloadCMake-d039f7414f9acc28ad1e51e775e888688f51a706.zip
CMake-d039f7414f9acc28ad1e51e775e888688f51a706.tar.gz
CMake-d039f7414f9acc28ad1e51e775e888688f51a706.tar.bz2
Help: Clarify file(GENERATE) only writes output file at generation phase
Closes: #16556
Diffstat (limited to 'Help/command/file.rst')
-rw-r--r--Help/command/file.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst
index 3e669c2..b2e4eea 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -304,6 +304,11 @@ Exactly one ``CONTENT`` or ``INPUT`` option must be given. A specific
Generated files are modified on subsequent cmake runs only if their content
is changed.
+Note also that ``file(GENERATE)`` does not create the output file until the
+generation phase. The output file will not yet have been written when the
+``file(GENERATE)`` command returns, it is written only after processing all
+of a project's ``CMakeLists.txt`` files.
+
------------------------------------------------------------------------------
::