Hi,

Patch with undocumented options -H/-B.

Ruslo
>From 6c378bd6622ca26c43225787494d60f1a9867b22 Mon Sep 17 00:00:00 2001
From: Ruslan Baratov <ruslan_bara...@yahoo.com>
Date: Thu, 30 Jun 2016 22:17:14 +0300
Subject: [PATCH] Document -H and -B options

---
 Help/manual/OPTIONS_BUILD.txt | 20 ++++++++++++++++++++
 Help/manual/cmake.1.rst       |  1 +
 2 files changed, 21 insertions(+)

diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt
index b428a74..1caa954 100644
--- a/Help/manual/OPTIONS_BUILD.txt
+++ b/Help/manual/OPTIONS_BUILD.txt
@@ -1,3 +1,23 @@
+``-H<path-to-source-tree>``
+ Path to directory with CMakeLists.txt.
+
+ There must be no spaces between ``-H`` and ``<path-to-source-tree>``
+ (otherwise option will be interpreted as synonym to ``--help``). Always must
+ be used with ``-B`` option. Example:
+
+ ::
+
+   cmake -H. -B_builds
+
+ Use current directory as a source tree (i.e. start with
+ ``./CMakeLists.txt``) and put generated files to the ``./_builds`` folder.
+
+``-B<path-to-build-tree>``
+ Path to directory where CMake will store generated files.
+
+ There must be no spaces between ``-B`` and ``<path-to-build-tree>``. Always
+ must be used with ``-H`` option.
+
 ``-C <initial-cache>``
  Pre-load a script to populate the cache.
 
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 8f7c336..593bb2d 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -9,6 +9,7 @@ Synopsis
 .. parsed-literal::
 
  cmake [<options>] (<path-to-source> | <path-to-existing-build>)
+ cmake -H<path-to-source-tree> -B<path-to-build-tree> [<options>]
  cmake [(-D <var>=<value>)...] -P <cmake-script-file>
  cmake --build <dir> [<options>...] [-- <build-tool-options>...]
  cmake -E <command> [<options>...]
-- 
1.9.1

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to