summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorSylvain Joubert <joubert.sy@gmail.com>2017-07-04 10:00:02 (GMT)
committerSylvain Joubert <joubert.sy@gmail.com>2017-07-04 10:00:02 (GMT)
commit58f47448210bf3fd3121bf91f74eb893ba9d034c (patch)
tree9b4a81430dda42f630fb03351332b4551aafde24 /Help/command
parent74112c8da16ea5f2a4940d196d178da684626f92 (diff)
downloadCMake-58f47448210bf3fd3121bf91f74eb893ba9d034c.zip
CMake-58f47448210bf3fd3121bf91f74eb893ba9d034c.tar.gz
CMake-58f47448210bf3fd3121bf91f74eb893ba9d034c.tar.bz2
configure_file: Add support for indented cmakedefine
Optional spaces and/or tabs are now understood between the '#' character and the 'cmakedefine'/'cmakedefine01' words. This indentation is preserved in the output lines. Fixes: #13037
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/configure_file.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Help/command/configure_file.rst b/Help/command/configure_file.rst
index 4304f09..75ec441 100644
--- a/Help/command/configure_file.rst
+++ b/Help/command/configure_file.rst
@@ -30,6 +30,18 @@ a false constant by the :command:`if` command. The "..." content on the
line after the variable name, if any, is processed as above.
Input file lines of the form ``#cmakedefine01 VAR`` will be replaced with
either ``#define VAR 1`` or ``#define VAR 0`` similarly.
+The result lines (with the exception of the ``#undef`` comments) can be
+indented using spaces and/or tabs between the ``#`` character
+and the ``cmakedefine`` or ``cmakedefine01`` words. This whitespace
+indentation will be preserved in the output lines::
+
+ # cmakedefine VAR
+ # cmakedefine01 VAR
+
+will be replaced, if ``VAR`` is defined, with::
+
+ # define VAR
+ # define VAR 1
If the input file is modified the build system will re-run CMake to
re-configure the file and generate the build system again.