summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-07-10 14:20:26 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-07-10 14:21:00 (GMT)
commit9eaf0fea2824b2e0b767915dec25deed9552905a (patch)
tree12c8dd6941d4a22be7c5083f506dfdfa2c939152 /Help
parentfc58819150a126d87bf17ad812bb6f62f28ae42b (diff)
parent58f47448210bf3fd3121bf91f74eb893ba9d034c (diff)
downloadCMake-9eaf0fea2824b2e0b767915dec25deed9552905a.zip
CMake-9eaf0fea2824b2e0b767915dec25deed9552905a.tar.gz
CMake-9eaf0fea2824b2e0b767915dec25deed9552905a.tar.bz2
Merge topic 'indented_cmakedefine'
58f47448 configure_file: Add support for indented cmakedefine Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1024
Diffstat (limited to 'Help')
-rw-r--r--Help/command/configure_file.rst12
-rw-r--r--Help/release/dev/indented_cmakedefine.rst7
2 files changed, 19 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.
diff --git a/Help/release/dev/indented_cmakedefine.rst b/Help/release/dev/indented_cmakedefine.rst
new file mode 100644
index 0000000..fd28b25
--- /dev/null
+++ b/Help/release/dev/indented_cmakedefine.rst
@@ -0,0 +1,7 @@
+indented_cmakedefine
+--------------------
+
+* The :command:`configure_file` command learned to support indented
+ ``# cmakedefine`` and ``# cmakedefine01``. Spaces and/or tabs between
+ the ``#`` character and the ``cmakedefine``/``cmakedefine01`` words
+ are now understood and preserved in the output.