summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/LINKS.txt21
-rw-r--r--Help/manual/OPTIONS_BUILD.txt57
-rw-r--r--Help/manual/OPTIONS_HELP.txt111
-rw-r--r--Help/manual/ccmake.1.rst161
-rw-r--r--Help/manual/cmake-gui.1.rst126
-rw-r--r--Help/manual/cmake-policies.7.rst1
-rw-r--r--Help/manual/cmake.1.rst313
-rw-r--r--Help/manual/cpack.1.rst146
-rw-r--r--Help/manual/ctest.1.rst126
-rw-r--r--Help/policy/CMP0024.rst2
-rw-r--r--Help/policy/CMP0025.rst6
-rw-r--r--Help/policy/CMP0026.rst2
-rw-r--r--Help/policy/CMP0027.rst25
-rw-r--r--Modules/CPackWIX.cmake4
-rw-r--r--Modules/Qt4Macros.cmake7
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cpack.cxx8
-rw-r--r--Source/CursesDialog/ccmake.cxx2
-rw-r--r--Source/QtDialog/CMakeSetup.cxx7
-rw-r--r--Source/cmDocumentation.cxx44
-rw-r--r--Source/cmDocumentation.h2
-rw-r--r--Source/cmPolicies.cxx438
-rw-r--r--Source/cmPolicies.h3
-rw-r--r--Source/cmRST.cxx2
-rw-r--r--Source/cmTarget.cxx51
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx6
-rw-r--r--Source/cmakemain.cxx77
-rw-r--r--Source/ctest.cxx8
-rw-r--r--Source/kwsys/SystemInformation.cxx9
-rw-r--r--Templates/TestDriver.cxx.in7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-result.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt17
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake10
-rw-r--r--Tests/RunCMake/CMP0022/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt13
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-NEW.cmake10
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt1
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt13
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-OLD.cmake10
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt1
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt18
-rw-r--r--Tests/RunCMake/CMP0027/CMP0027-WARN.cmake8
-rw-r--r--Tests/RunCMake/CMP0027/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0027/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMP0027/empty.cpp0
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
48 files changed, 545 insertions, 1348 deletions
diff --git a/Help/manual/LINKS.txt b/Help/manual/LINKS.txt
new file mode 100644
index 0000000..fcd8533
--- /dev/null
+++ b/Help/manual/LINKS.txt
@@ -0,0 +1,21 @@
+The following resources are available to get help using CMake:
+
+* ``Home Page``: http://www.cmake.org
+
+ The primary starting point for learning about CMake.
+
+* ``Frequently Asked Questions``: http://www.cmake.org/Wiki/CMake_FAQ
+
+ A Wiki is provided containing answers to frequently asked questions.
+
+* ``Online Documentation``: http://www.cmake.org/HTML/Documentation.html
+
+ Links to available documentation may be found on this web page.
+
+* ``Mailing List``: http://www.cmake.org/HTML/MailingLists.html
+
+ For help and discussion about using cmake, a mailing list is
+ provided at cmake@cmake.org. The list is member-post-only but one
+ may sign up on the CMake web page. Please first read the full
+ documentation at http://www.cmake.org before posting questions to
+ the list.
diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt
new file mode 100644
index 0000000..3aded5c
--- /dev/null
+++ b/Help/manual/OPTIONS_BUILD.txt
@@ -0,0 +1,57 @@
+* ``-C <initial-cache>``: Pre-load a script to populate the cache.
+
+ When cmake is first run in an empty build tree, it creates a
+ CMakeCache.txt file and populates it with customizable settings for
+ the project. This option may be used to specify a file from which
+ to load cache entries before the first pass through the project's
+ cmake listfiles. The loaded entries take priority over the
+ project's default values. The given file should be a CMake script
+ containing SET commands that use the CACHE option, not a
+ cache-format file.
+
+* ``-D <var>:<type>=<value>``: Create a cmake cache entry.
+
+ When cmake is first run in an empty build tree, it creates a
+ CMakeCache.txt file and populates it with customizable settings for
+ the project. This option may be used to specify a setting that
+ takes priority over the project's default value. The option may be
+ repeated for as many cache entries as desired.
+
+* ``-U <globbing_expr>``: Remove matching entries from CMake cache.
+
+ This option may be used to remove one or more variables from the
+ CMakeCache.txt file, globbing expressions using * and ? are
+ supported. The option may be repeated for as many cache entries as
+ desired.
+
+ Use with care, you can make your CMakeCache.txt non-working.
+
+* ``-G <generator-name>``: Specify a build system generator.
+
+ CMake may support multiple native build systems on certain
+ platforms. A generator is responsible for generating a particular
+ build system. Possible generator names are specified in the
+ Generators section.
+
+* ``-T <toolset-name>``: Specify toolset name if supported by generator.
+
+ Some CMake generators support a toolset name to be given to the
+ native build system to choose a compiler. This is supported only on
+ specific generators:
+
+ ::
+
+ Visual Studio >= 10
+ Xcode >= 3.0
+
+ See native build system documentation for allowed toolset names.
+
+* ``-Wno-dev``: Suppress developer warnings.
+
+ Suppress warnings that are meant for the author of the
+ CMakeLists.txt files.
+
+* ``-Wdev``: Enable developer warnings.
+
+ Enable warnings that are meant for the author of the CMakeLists.txt
+ files.
diff --git a/Help/manual/OPTIONS_HELP.txt b/Help/manual/OPTIONS_HELP.txt
new file mode 100644
index 0000000..baaab0f
--- /dev/null
+++ b/Help/manual/OPTIONS_HELP.txt
@@ -0,0 +1,111 @@
+.. |file| replace:: The help is printed to a named <f>ile if given.
+
+* ``--help,-help,-usage,-h,-H,/?``: Print usage information and exit.
+
+ Usage describes the basic command line interface and its options.
+
+* ``--version,-version,/V [<f>]``: Show program name/version banner and exit.
+
+ If a file is specified, the version is written into it.
+ |file|
+
+* ``--help-manual <man> [<f>]``: Print one help manual and exit.
+
+ The specified manual is printed in a human-readable text format.
+ |file|
+
+* ``--help-manual-list [<f>]``: List help manuals available and exit.
+
+ The list contains all manuals for which help may be obtained by
+ using the ``--help-manual`` option followed by a manual name.
+ |file|
+
+* ``--help-command <cmd> [<f>]``: Print help for one command and exit.
+
+ The :manual:`cmake-commands(7)` manual entry for ``<cmd>`` is
+ printed in a human-readable text format.
+ |file|
+
+* ``--help-command-list [<f>]``: List commands with help available and exit.
+
+ The list contains all commands for which help may be obtained by
+ using the ``--help-command`` option followed by a command name.
+ |file|
+
+* ``--help-commands [<f>]``: Print cmake-commands manual and exit.
+
+ The :manual:`cmake-commands(7)` manual is printed in a
+ human-readable text format.
+ |file|
+
+* ``--help-module <mod> [<f>]``: Print help for one module and exit.
+
+ The :manual:`cmake-modules(7)` manual entry for ``<mod>`` is printed
+ in a human-readable text format.
+ |file|
+
+* ``--help-module-list [<f>]``: List modules with help available and exit.
+
+ The list contains all modules for which help may be obtained by
+ using the ``--help-module`` option followed by a module name.
+ |file|
+
+* ``--help-modules [<f>]``: Print cmake-modules manual and exit.
+
+ The :manual:`cmake-modules(7)` manual is printed in a human-readable
+ text format.
+ |file|
+
+* ``--help-policy <cmp> [<f>]``: Print help for one policy and exit.
+
+ The :manual:`cmake-policies(7)` manual entry for ``<cmp>`` is
+ printed in a human-readable text format.
+ |file|
+
+* ``--help-policy-list [<f>]``: List policies with help available and exit.
+
+ The list contains all policies for which help may be obtained by
+ using the ``--help-policy`` option followed by a policy name.
+ |file|
+
+* ``--help-policies [<f>]``: Print cmake-policies manual and exit.
+
+ The :manual:`cmake-policies(7)` manual is printed in a
+ human-readable text format.
+ |file|
+
+* ``--help-property <prop> [<f>]``: Print help for one property and exit.
+
+ The :manual:`cmake-properties(7)` manual entries for ``<prop>`` are
+ printed in a human-readable text format.
+ |file|
+
+* ``--help-property-list [<f>]``: List properties with help available and exit.
+
+ The list contains all properties for which help may be obtained by
+ using the ``--help-property`` option followed by a property name.
+ |file|
+
+* ``--help-properties [<f>]``: Print cmake-properties manual and exit.
+
+ The :manual:`cmake-properties(7)` manual is printed in a
+ human-readable text format.
+ |file|
+
+* ``--help-variable <var> [<f>]``: Print help for one variable and exit.
+
+ The :manual:`cmake-variables(7)` manual entry for ``<var>`` is
+ printed in a human-readable text format.
+ |file|
+
+* ``--help-variable-list [<f>]``: List variables with help available and exit.
+
+ The list contains all variables for which help may be obtained by
+ using the ``--help-variable`` option followed by a variable name.
+ |file|
+
+* ``--help-variables [<f>]``: Print cmake-variables manual and exit.
+
+ The :manual:`cmake-variables(7)` manual is printed in a
+ human-readable text format.
+ |file|
diff --git a/Help/manual/ccmake.1.rst b/Help/manual/ccmake.1.rst
index b5146e7..62a7dcf 100644
--- a/Help/manual/ccmake.1.rst
+++ b/Help/manual/ccmake.1.rst
@@ -1,15 +1,17 @@
ccmake(1)
*********
-::
-
- ccmake - Curses Interface for CMake.
+Synopsis
+========
::
ccmake <path-to-source>
ccmake <path-to-existing-build>
+Description
+===========
+
The "ccmake" executable is the CMake curses interface. Project
configuration settings may be specified interactively through this
GUI. Brief instructions are provided at the bottom of the terminal
@@ -21,154 +23,11 @@ in each directory of a source tree with the name CMakeLists.txt.
Users build a project by using CMake to generate a build system for a
native tool on their platform.
+.. include:: OPTIONS_BUILD.txt
-* ``-C <initial-cache>``: Pre-load a script to populate the cache.
-
- When cmake is first run in an empty build tree, it creates a
- CMakeCache.txt file and populates it with customizable settings for
- the project. This option may be used to specify a file from which
- to load cache entries before the first pass through the project's
- cmake listfiles. The loaded entries take priority over the
- project's default values. The given file should be a CMake script
- containing SET commands that use the CACHE option, not a
- cache-format file.
-
-* ``-D <var>:<type>=<value>``: Create a cmake cache entry.
-
- When cmake is first run in an empty build tree, it creates a
- CMakeCache.txt file and populates it with customizable settings for
- the project. This option may be used to specify a setting that
- takes priority over the project's default value. The option may be
- repeated for as many cache entries as desired.
-
-* ``-U <globbing_expr>``: Remove matching entries from CMake cache.
-
- This option may be used to remove one or more variables from the
- CMakeCache.txt file, globbing expressions using * and ? are
- supported. The option may be repeated for as many cache entries as
- desired.
-
- Use with care, you can make your CMakeCache.txt non-working.
-
-* ``-G <generator-name>``: Specify a build system generator.
-
- CMake may support multiple native build systems on certain
- platforms. A generator is responsible for generating a particular
- build system. Possible generator names are specified in the
- Generators section.
-
-* ``-T <toolset-name>``: Specify toolset name if supported by generator.
-
- Some CMake generators support a toolset name to be given to the
- native build system to choose a compiler. This is supported only on
- specific generators:
-
- ::
-
- Visual Studio >= 10
- Xcode >= 3.0
-
- See native build system documentation for allowed toolset names.
-
-* ``-Wno-dev``: Suppress developer warnings.
-
- Suppress warnings that are meant for the author of the
- CMakeLists.txt files.
-
-* ``-Wdev``: Enable developer warnings.
-
- Enable warnings that are meant for the author of the CMakeLists.txt
- files.
-
-* ``--copyright [file]``: Print the CMake copyright and exit.
-
- If a file is specified, the copyright is written into it.
-
-* ``--help,-help,-usage,-h,-H,/?``: Print usage information and exit.
-
- Usage describes the basic command line interface and its options.
-
-* ``--help-full [file]``: Print full help and exit.
-
- Full help displays most of the documentation provided by the UNIX
- man page. It is provided for use on non-UNIX platforms, but is also
- convenient if the man page is not installed. If a file is
- specified, the help is written into it.
-
-* ``--help-html [file]``: Print full help in HTML format.
-
- This option is used by CMake authors to help produce web pages. If
- a file is specified, the help is written into it.
-
-* ``--help-man [file]``: Print full help as a UNIX man page and exit.
-
- This option is used by the cmake build to generate the UNIX man
- page. If a file is specified, the help is written into it.
-
-* ``--version,-version,/V [file]``: Show program name/version banner and exit.
-
- If a file is specified, the version is written into it.
-
-::
-
- CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.
-
-This is the documentation for the properties supported by CMake.
-Properties can have different scopes. They can either be assigned to
-a source file, a directory, a target or globally to CMake. By
-modifying the values of properties the behaviour of the build system
-can be customized.
-
-Copyright 2000-2012 Kitware, Inc., Insight Software Consortium. All
-rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-Neither the names of Kitware, Inc., the Insight Software Consortium,
-nor the names of their contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The following resources are available to get help using CMake:
-
-
-* ``Home Page``: http://www.cmake.org
-
- The primary starting point for learning about CMake.
-
-* ``Frequently Asked Questions``: http://www.cmake.org/Wiki/CMake_FAQ
-
- A Wiki is provided containing answers to frequently asked questions.
-
-* ``Online Documentation``: http://www.cmake.org/HTML/Documentation.html
-
- Links to available documentation may be found on this web page.
+.. include:: OPTIONS_HELP.txt
-* ``Mailing List``: http://www.cmake.org/HTML/MailingLists.html
+See Also
+========
- For help and discussion about using cmake, a mailing list is
- provided at cmake@cmake.org. The list is member-post-only but one
- may sign up on the CMake web page. Please first read the full
- documentation at http://www.cmake.org before posting questions to
- the list.
+.. include:: LINKS.txt
diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst
index b4f295f..e773ee1 100644
--- a/Help/manual/cmake-gui.1.rst
+++ b/Help/manual/cmake-gui.1.rst
@@ -1,9 +1,8 @@
cmake-gui(1)
************
-::
-
- cmake-gui - CMake GUI.
+Synopsis
+========
::
@@ -11,6 +10,9 @@ cmake-gui(1)
cmake-gui [options] <path-to-source>
cmake-gui [options] <path-to-existing-build>
+Description
+===========
+
The "cmake-gui" executable is the CMake GUI. Project configuration
settings may be specified interactively. Brief instructions are
provided at the bottom of the window when the program is running.
@@ -21,119 +23,9 @@ in each directory of a source tree with the name CMakeLists.txt.
Users build a project by using CMake to generate a build system for a
native tool on their platform.
+.. include:: OPTIONS_HELP.txt
-* ``--copyright [file]``: Print the CMake copyright and exit.
-
- If a file is specified, the copyright is written into it.
-
-* ``--help,-help,-usage,-h,-H,/?``: Print usage information and exit.
-
- Usage describes the basic command line interface and its options.
-
-* ``--help-full [file]``: Print full help and exit.
-
- Full help displays most of the documentation provided by the UNIX
- man page. It is provided for use on non-UNIX platforms, but is also
- convenient if the man page is not installed. If a file is
- specified, the help is written into it.
-
-* ``--help-html [file]``: Print full help in HTML format.
-
- This option is used by CMake authors to help produce web pages. If
- a file is specified, the help is written into it.
-
-* ``--help-man [file]``: Print full help as a UNIX man page and exit.
-
- This option is used by the cmake build to generate the UNIX man
- page. If a file is specified, the help is written into it.
-
-* ``--version,-version,/V [file]``: Show program name/version banner and exit.
-
- If a file is specified, the version is written into it.
-
-The following generators are available on this platform:
-
-::
-
- CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.
-
-This is the documentation for the properties supported by CMake.
-Properties can have different scopes. They can either be assigned to
-a source file, a directory, a target or globally to CMake. By
-modifying the values of properties the behaviour of the build system
-can be customized.
-
-::
-
- CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.
-
-This is the documentation for now obsolete listfile commands from
-previous CMake versions, which are still supported for compatibility
-reasons. You should instead use the newer, faster and shinier new
-commands. ;-)
-
-The following modules are provided with CMake. They can be used with
-INCLUDE(ModuleName).
-
-::
-
- CMake Modules - Modules coming with CMake, the Cross-Platform Makefile Generator.
-
-This is the documentation for the modules and scripts coming with
-CMake. Using these modules you can check the computer system for
-installed software packages, features of the compiler and the
-existence of headers to name just a few.
-
-Copyright 2000-2012 Kitware, Inc., Insight Software Consortium. All
-rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-Neither the names of Kitware, Inc., the Insight Software Consortium,
-nor the names of their contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The following resources are available to get help using CMake:
-
-
-* ``Home Page``: http://www.cmake.org
-
- The primary starting point for learning about CMake.
-
-* ``Frequently Asked Questions``: http://www.cmake.org/Wiki/CMake_FAQ
-
- A Wiki is provided containing answers to frequently asked questions.
-
-* ``Online Documentation``: http://www.cmake.org/HTML/Documentation.html
-
- Links to available documentation may be found on this web page.
-
-* ``Mailing List``: http://www.cmake.org/HTML/MailingLists.html
+See Also
+========
- For help and discussion about using cmake, a mailing list is
- provided at cmake@cmake.org. The list is member-post-only but one
- may sign up on the CMake web page. Please first read the full
- documentation at http://www.cmake.org before posting questions to
- the list.
+.. include:: LINKS.txt
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index cd91c91..658620f 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -36,3 +36,4 @@ All Policies
/policy/CMP0024
/policy/CMP0025
/policy/CMP0026
+ /policy/CMP0027
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index ace9307..64d0fb3 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -1,15 +1,17 @@
cmake(1)
********
-::
-
- cmake - Cross-Platform Makefile Generator.
+Synopsis
+========
::
cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>
+Description
+===========
+
The "cmake" executable is the CMake command-line interface. It may be
used to configure projects in scripts. Project configuration settings
may be specified on the command line with the -D option. The -i
@@ -21,64 +23,7 @@ in each directory of a source tree with the name CMakeLists.txt.
Users build a project by using CMake to generate a build system for a
native tool on their platform.
-
-* ``-C <initial-cache>``: Pre-load a script to populate the cache.
-
- When cmake is first run in an empty build tree, it creates a
- CMakeCache.txt file and populates it with customizable settings for
- the project. This option may be used to specify a file from which
- to load cache entries before the first pass through the project's
- cmake listfiles. The loaded entries take priority over the
- project's default values. The given file should be a CMake script
- containing SET commands that use the CACHE option, not a
- cache-format file.
-
-* ``-D <var>:<type>=<value>``: Create a cmake cache entry.
-
- When cmake is first run in an empty build tree, it creates a
- CMakeCache.txt file and populates it with customizable settings for
- the project. This option may be used to specify a setting that
- takes priority over the project's default value. The option may be
- repeated for as many cache entries as desired.
-
-* ``-U <globbing_expr>``: Remove matching entries from CMake cache.
-
- This option may be used to remove one or more variables from the
- CMakeCache.txt file, globbing expressions using * and ? are
- supported. The option may be repeated for as many cache entries as
- desired.
-
- Use with care, you can make your CMakeCache.txt non-working.
-
-* ``-G <generator-name>``: Specify a build system generator.
-
- CMake may support multiple native build systems on certain
- platforms. A generator is responsible for generating a particular
- build system. Possible generator names are specified in the
- Generators section.
-
-* ``-T <toolset-name>``: Specify toolset name if supported by generator.
-
- Some CMake generators support a toolset name to be given to the
- native build system to choose a compiler. This is supported only on
- specific generators:
-
- ::
-
- Visual Studio >= 10
- Xcode >= 3.0
-
- See native build system documentation for allowed toolset names.
-
-* ``-Wno-dev``: Suppress developer warnings.
-
- Suppress warnings that are meant for the author of the
- CMakeLists.txt files.
-
-* ``-Wdev``: Enable developer warnings.
-
- Enable warnings that are meant for the author of the CMakeLists.txt
- files.
+.. include:: OPTIONS_BUILD.txt
* ``-E``: CMake command mode.
@@ -196,247 +141,9 @@ native tool on their platform.
in CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR. This flag tells CMake to
warn about other files as well.
-* ``--help-command cmd [file]``: Print help for a single command and exit.
-
- Full documentation specific to the given command is displayed. If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-command-list [file]``: List available listfile commands and exit.
-
- The list contains all commands for which help may be obtained by
- using the --help-command argument followed by a command name. If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-commands [file]``: Print help for all commands and exit.
-
- Full documentation specific for all current commands is displayed.If
- a file is specified, the documentation is written into and the
- output format is determined depending on the filename suffix.
- Supported are man page, HTML, DocBook and plain text.
-
-* ``--help-compatcommands [file]``: Print help for compatibility commands.
-
- Full documentation specific for all compatibility commands is
- displayed.If a file is specified, the documentation is written into
- and the output format is determined depending on the filename
- suffix. Supported are man page, HTML, DocBook and plain text.
-
-* ``--help-module module [file]``: Print help for a single module and exit.
-
- Full documentation specific to the given module is displayed.If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-module-list [file]``: List available modules and exit.
-
- The list contains all modules for which help may be obtained by
- using the --help-module argument followed by a module name. If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-modules [file]``: Print help for all modules and exit.
-
- Full documentation for all modules is displayed. If a file is
- specified, the documentation is written into and the output format
- is determined depending on the filename suffix. Supported are man
- page, HTML, DocBook and plain text.
-
-* ``--help-custom-modules [file]``: Print help for all custom modules and exit.
-
- Full documentation for all custom modules is displayed. If a file
- is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-policy cmp [file]``: Print help for a single policy and exit.
-
- Full documentation specific to the given policy is displayed.If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-policy-list [file]``: List available policies and exit.
-
- The list contains all policies for which help may be obtained by
- using the --help-policy argument followed by a policy name. If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-policies [file]``: Print help for all policies and exit.
-
- Full documentation for all policies is displayed.If a file is
- specified, the documentation is written into and the output format
- is determined depending on the filename suffix. Supported are man
- page, HTML, DocBook and plain text.
-
-* ``--help-property prop [file]``: Print help for a single property and exit.
-
- Full documentation specific to the given property is displayed.If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-property-list [file]``: List available properties and exit.
-
- The list contains all properties for which help may be obtained by
- using the --help-property argument followed by a property name. If
- a file is specified, the help is written into it.If a file is
- specified, the documentation is written into and the output format
- is determined depending on the filename suffix. Supported are man
- page, HTML, DocBook and plain text.
-
-* ``--help-properties [file]``: Print help for all properties and exit.
-
- Full documentation for all properties is displayed.If a file is
- specified, the documentation is written into and the output format
- is determined depending on the filename suffix. Supported are man
- page, HTML, DocBook and plain text.
-
-* ``--help-variable var [file]``: Print help for a single variable and exit.
-
- Full documentation specific to the given variable is displayed.If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-variable-list [file]``: List documented variables and exit.
-
- The list contains all variables for which help may be obtained by
- using the --help-variable argument followed by a variable name. If
- a file is specified, the help is written into it.If a file is
- specified, the documentation is written into and the output format
- is determined depending on the filename suffix. Supported are man
- page, HTML, DocBook and plain text.
-
-* ``--help-variables [file]``: Print help for all variables and exit.
-
- Full documentation for all variables is displayed.If a file is
- specified, the documentation is written into and the output format
- is determined depending on the filename suffix. Supported are man
- page, HTML, DocBook and plain text.
-
-* ``--copyright [file]``: Print the CMake copyright and exit.
-
- If a file is specified, the copyright is written into it.
-
-* ``--help,-help,-usage,-h,-H,/?``: Print usage information and exit.
-
- Usage describes the basic command line interface and its options.
-
-* ``--help-full [file]``: Print full help and exit.
-
- Full help displays most of the documentation provided by the UNIX
- man page. It is provided for use on non-UNIX platforms, but is also
- convenient if the man page is not installed. If a file is
- specified, the help is written into it.
-
-* ``--help-html [file]``: Print full help in HTML format.
-
- This option is used by CMake authors to help produce web pages. If
- a file is specified, the help is written into it.
-
-* ``--help-man [file]``: Print full help as a UNIX man page and exit.
-
- This option is used by the cmake build to generate the UNIX man
- page. If a file is specified, the help is written into it.
-
-* ``--version,-version,/V [file]``: Show program name/version banner and exit.
-
- If a file is specified, the version is written into it.
-
-The following generators are available on this platform:
-
-::
-
- CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.
-
-This is the documentation for the properties supported by CMake.
-Properties can have different scopes. They can either be assigned to
-a source file, a directory, a target or globally to CMake. By
-modifying the values of properties the behaviour of the build system
-can be customized.
-
-::
-
- CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.
-
-This is the documentation for now obsolete listfile commands from
-previous CMake versions, which are still supported for compatibility
-reasons. You should instead use the newer, faster and shinier new
-commands. ;-)
-
-The following modules are provided with CMake. They can be used with
-INCLUDE(ModuleName).
-
-::
-
- CMake Modules - Modules coming with CMake, the Cross-Platform Makefile Generator.
-
-This is the documentation for the modules and scripts coming with
-CMake. Using these modules you can check the computer system for
-installed software packages, features of the compiler and the
-existence of headers to name just a few.
-
-variables defined by cmake, that give information about the project,
-and cmake
-
-Copyright 2000-2012 Kitware, Inc., Insight Software Consortium. All
-rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-Neither the names of Kitware, Inc., the Insight Software Consortium,
-nor the names of their contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The following resources are available to get help using CMake:
-
-
-* ``Home Page``: http://www.cmake.org
-
- The primary starting point for learning about CMake.
-
-* ``Frequently Asked Questions``: http://www.cmake.org/Wiki/CMake_FAQ
-
- A Wiki is provided containing answers to frequently asked questions.
-
-* ``Online Documentation``: http://www.cmake.org/HTML/Documentation.html
-
- Links to available documentation may be found on this web page.
+.. include:: OPTIONS_HELP.txt
-* ``Mailing List``: http://www.cmake.org/HTML/MailingLists.html
+See Also
+========
- For help and discussion about using cmake, a mailing list is
- provided at cmake@cmake.org. The list is member-post-only but one
- may sign up on the CMake web page. Please first read the full
- documentation at http://www.cmake.org before posting questions to
- the list.
+.. include:: LINKS.txt
diff --git a/Help/manual/cpack.1.rst b/Help/manual/cpack.1.rst
index 401283c..5c6567c 100644
--- a/Help/manual/cpack.1.rst
+++ b/Help/manual/cpack.1.rst
@@ -1,14 +1,16 @@
cpack(1)
********
-::
-
- cpack - Packaging driver provided by CMake.
+Synopsis
+========
::
cpack -G <generator> [options]
+Description
+===========
+
The "cpack" executable is the CMake packaging program.
CMake-generated build trees created for projects that use the
INSTALL_* commands have packaging support. This program will generate
@@ -73,139 +75,9 @@ native tool on their platform.
If vendor is not specified on cpack command line (or inside
CMakeLists.txt) thenCPack.cmake defines it with a default value
-* ``--help-command cmd [file]``: Print help for a single command and exit.
-
- Full documentation specific to the given command is displayed. If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-command-list [file]``: List available commands and exit.
-
- The list contains all commands for which help may be obtained by
- using the --help-command argument followed by a command name. If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-commands [file]``: Print help for all commands and exit.
-
- Full documentation specific for all current command is displayed.If
- a file is specified, the documentation is written into and the
- output format is determined depending on the filename suffix.
- Supported are man page, HTML, DocBook and plain text.
-
-* ``--help-variable var [file]``: Print help for a single variable and exit.
-
- Full documentation specific to the given variable is displayed.If a
- file is specified, the documentation is written into and the output
- format is determined depending on the filename suffix. Supported
- are man page, HTML, DocBook and plain text.
-
-* ``--help-variable-list [file]``: List documented variables and exit.
-
- The list contains all variables for which help may be obtained by
- using the --help-variable argument followed by a variable name. If
- a file is specified, the help is written into it.If a file is
- specified, the documentation is written into and the output format
- is determined depending on the filename suffix. Supported are man
- page, HTML, DocBook and plain text.
-
-* ``--help-variables [file]``: Print help for all variables and exit.
-
- Full documentation for all variables is displayed.If a file is
- specified, the documentation is written into and the output format
- is determined depending on the filename suffix. Supported are man
- page, HTML, DocBook and plain text.
-
-* ``--copyright [file]``: Print the CMake copyright and exit.
-
- If a file is specified, the copyright is written into it.
-
-* ``--help,-help,-usage,-h,-H,/?``: Print usage information and exit.
-
- Usage describes the basic command line interface and its options.
-
-* ``--help-full [file]``: Print full help and exit.
-
- Full help displays most of the documentation provided by the UNIX
- man page. It is provided for use on non-UNIX platforms, but is also
- convenient if the man page is not installed. If a file is
- specified, the help is written into it.
-
-* ``--help-html [file]``: Print full help in HTML format.
-
- This option is used by CMake authors to help produce web pages. If
- a file is specified, the help is written into it.
-
-* ``--help-man [file]``: Print full help as a UNIX man page and exit.
-
- This option is used by the cmake build to generate the UNIX man
- page. If a file is specified, the help is written into it.
-
-* ``--version,-version,/V [file]``: Show program name/version banner and exit.
-
- If a file is specified, the version is written into it.
-
-::
-
- CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.
-
-This is the documentation for now obsolete listfile commands from
-previous CMake versions, which are still supported for compatibility
-reasons. You should instead use the newer, faster and shinier new
-commands. ;-)
-
-Copyright 2000-2012 Kitware, Inc., Insight Software Consortium. All
-rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-Neither the names of Kitware, Inc., the Insight Software Consortium,
-nor the names of their contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The following resources are available to get help using CMake:
-
-
-* ``Home Page``: http://www.cmake.org
-
- The primary starting point for learning about CMake.
-
-* ``Frequently Asked Questions``: http://www.cmake.org/Wiki/CMake_FAQ
-
- A Wiki is provided containing answers to frequently asked questions.
-
-* ``Online Documentation``: http://www.cmake.org/HTML/Documentation.html
-
- Links to available documentation may be found on this web page.
+.. include:: OPTIONS_HELP.txt
-* ``Mailing List``: http://www.cmake.org/HTML/MailingLists.html
+See Also
+========
- For help and discussion about using cmake, a mailing list is
- provided at cmake@cmake.org. The list is member-post-only but one
- may sign up on the CMake web page. Please first read the full
- documentation at http://www.cmake.org before posting questions to
- the list.
+.. include:: LINKS.txt
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 1ce59ae..43fb961 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -1,14 +1,16 @@
ctest(1)
********
-::
-
- ctest - Testing driver provided by CMake.
+Synopsis
+========
::
ctest [options]
+Description
+===========
+
The "ctest" executable is the CMake test driver program.
CMake-generated build trees created for projects that use the
ENABLE_TESTING and ADD_TEST commands have testing support. This
@@ -302,119 +304,9 @@ program will run the tests and report results.
This option will not run any tests, it will simply print the list of
all labels associated with the test set.
-* ``--help-command <cmd> [<file>]``: Show help for a single command and exit.
-
- Prints the help for the command to stdout or to the specified file.
-
-* ``--help-command-list [<file>]``: List available commands and exit.
-
- Prints the list of all available listfile commands to stdout or the
- specified file.
-
-* ``--help-commands [<file>]``: Print help for all commands and exit.
-
- Prints the help for all commands to stdout or to the specified file.
-
-* ``--copyright [file]``: Print the CMake copyright and exit.
-
- If a file is specified, the copyright is written into it.
-
-* ``--help,-help,-usage,-h,-H,/?``: Print usage information and exit.
-
- Usage describes the basic command line interface and its options.
-
-* ``--help-full [file]``: Print full help and exit.
-
- Full help displays most of the documentation provided by the UNIX
- man page. It is provided for use on non-UNIX platforms, but is also
- convenient if the man page is not installed. If a file is
- specified, the help is written into it.
-
-* ``--help-html [file]``: Print full help in HTML format.
-
- This option is used by CMake authors to help produce web pages. If
- a file is specified, the help is written into it.
-
-* ``--help-man [file]``: Print full help as a UNIX man page and exit.
-
- This option is used by the cmake build to generate the UNIX man
- page. If a file is specified, the help is written into it.
-
-* ``--version,-version,/V [file]``: Show program name/version banner and exit.
-
- If a file is specified, the version is written into it.
-
-The following generators are available on this platform:
-
-::
-
- CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.
-
-This is the documentation for the properties supported by CMake.
-Properties can have different scopes. They can either be assigned to
-a source file, a directory, a target or globally to CMake. By
-modifying the values of properties the behaviour of the build system
-can be customized.
-
-::
-
- CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.
-
-This is the documentation for now obsolete listfile commands from
-previous CMake versions, which are still supported for compatibility
-reasons. You should instead use the newer, faster and shinier new
-commands. ;-)
-
-Copyright 2000-2012 Kitware, Inc., Insight Software Consortium. All
-rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-Neither the names of Kitware, Inc., the Insight Software Consortium,
-nor the names of their contributors may be used to endorse or promote
-products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The following resources are available to get help using CMake:
-
-
-* ``Home Page``: http://www.cmake.org
-
- The primary starting point for learning about CMake.
-
-* ``Frequently Asked Questions``: http://www.cmake.org/Wiki/CMake_FAQ
-
- A Wiki is provided containing answers to frequently asked questions.
-
-* ``Online Documentation``: http://www.cmake.org/HTML/Documentation.html
-
- Links to available documentation may be found on this web page.
+.. include:: OPTIONS_HELP.txt
-* ``Mailing List``: http://www.cmake.org/HTML/MailingLists.html
+See Also
+========
- For help and discussion about using cmake, a mailing list is
- provided at cmake@cmake.org. The list is member-post-only but one
- may sign up on the CMake web page. Please first read the full
- documentation at http://www.cmake.org before posting questions to
- the list.
+.. include:: LINKS.txt
diff --git a/Help/policy/CMP0024.rst b/Help/policy/CMP0024.rst
index ce0b2e6..4c8c714 100644
--- a/Help/policy/CMP0024.rst
+++ b/Help/policy/CMP0024.rst
@@ -17,6 +17,6 @@ The OLD behavior for this policy is to allow including the result of
an export() command. The NEW behavior for this policy is to not to
allow including the result of an export() command.
-This policy was introduced in CMake version 2.8.13. CMake version
+This policy was introduced in CMake version 3.0.0. CMake version
|release| warns when the policy is not set and uses OLD behavior. Use
the cmake_policy command to set it to OLD or NEW explicitly.
diff --git a/Help/policy/CMP0025.rst b/Help/policy/CMP0025.rst
index 25957e9..fbb9b5e 100644
--- a/Help/policy/CMP0025.rst
+++ b/Help/policy/CMP0025.rst
@@ -3,12 +3,12 @@ CMP0025
Compiler id for Apple Clang is now AppleClang.
-CMake >= 2.8.13 recognize that Apple Clang is a different compiler
+CMake >= 3.0.0 recognize that Apple Clang is a different compiler
than upstream Clang and that they have different version numbers.
CMake now prefers to present this to projects by setting
CMAKE_<LANG>_COMPILER_ID to "AppleClang" instead of "Clang". However,
existing projects may assume the compiler id for Apple Clang is just
-"Clang" as it was in CMake < 2.8.13. Therefore this policy determines
+"Clang" as it was in CMake < 3.0.0. Therefore this policy determines
for Apple Clang which compiler id to report in
CMAKE_<LANG>_COMPILER_ID after <LANG> is enabled by the project() or
enable_language() command.
@@ -16,6 +16,6 @@ enable_language() command.
The OLD behavior for this policy is to use compiler id "Clang". The
NEW behavior for this policy is to use compiler id "AppleClang".
-This policy was introduced in CMake version 2.8.13. CMake version
+This policy was introduced in CMake version 3.0.0. CMake version
|release| warns when the policy is not set and uses OLD behavior. Use
the cmake_policy command to set it to OLD or NEW explicitly.
diff --git a/Help/policy/CMP0026.rst b/Help/policy/CMP0026.rst
index 585da56..d3079dc 100644
--- a/Help/policy/CMP0026.rst
+++ b/Help/policy/CMP0026.rst
@@ -20,6 +20,6 @@ The OLD behavior for this policy is to allow reading the LOCATION
property from build-targets. The NEW behavior for this policy is to
not to allow reading the LOCATION property from build-targets.
-This policy was introduced in CMake version 2.8.13. CMake version
+This policy was introduced in CMake version 3.0.0. CMake version
|release| warns when the policy is not set and uses OLD behavior. Use
the cmake_policy command to set it to OLD or NEW explicitly.
diff --git a/Help/policy/CMP0027.rst b/Help/policy/CMP0027.rst
new file mode 100644
index 0000000..352f7b8
--- /dev/null
+++ b/Help/policy/CMP0027.rst
@@ -0,0 +1,25 @@
+CMP0027
+-------
+
+Conditionally linked imported targets with missing include directories.
+
+CMake 2.8.11 introduced introduced the concept of
+INTERFACE_INCLUDE_DIRECTORIES, and a check at cmake time that the
+entries in the INTERFACE_INCLUDE_DIRECTORIES of an IMPORTED target
+actually exist. CMake 2.8.11 also introduced generator expression
+support in the target_link_libraries command. However, if an imported
+target is linked as a result of a generator expression evaluation, the
+entries in the INTERFACE_INCLUDE_DIRECTORIES of that target were not
+checked for existence as they should be.
+
+The OLD behavior of this policy is to report a warning if an entry in
+the INTERFACE_INCLUDE_DIRECTORIES of a generator-expression
+conditionally linked IMPORTED target does not exist.
+
+The NEW behavior of this policy is to report an error if an entry in
+the INTERFACE_INCLUDE_DIRECTORIES of a generator-expression
+conditionally linked IMPORTED target does not exist.
+
+This policy was introduced in CMake version 3.0.0. CMake version
+|release| warns when the policy is not set and uses OLD behavior. Use
+the cmake_policy command to set it to OLD or NEW explicitly.
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
index 7c7d924..f4fcf6a 100644
--- a/Modules/CPackWIX.cmake
+++ b/Modules/CPackWIX.cmake
@@ -12,7 +12,7 @@
#
# .. variable:: CPACK_WIX_UPGRADE_GUID
#
-# Upgrade GUID (Product/@UpgradeCode)
+# Upgrade GUID (``Product/@UpgradeCode``)
#
# Will be automatically generated unless explicitly provided.
#
@@ -33,7 +33,7 @@
#
# .. variable:: CPACK_WIX_PRODUCT_GUID
#
-# Product GUID (Product/@Id)
+# Product GUID (``Product/@Id``)
#
# Will be automatically generated unless explicitly provided.
#
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index e56634d..b5f005f 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -432,15 +432,16 @@ macro(QT4_CREATE_TRANSLATION _qm_files)
set(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
set(_pro_srcs)
foreach(_pro_src ${_my_sources})
- set(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
+ set(_pro_srcs "${_pro_srcs} \\\n \"${_pro_src}\"")
endforeach()
set(_pro_includes)
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
+ list(REMOVE_DUPLICATES _inc_DIRS)
foreach(_pro_include ${_inc_DIRS})
get_filename_component(_abs_include "${_pro_include}" ABSOLUTE)
- set(_pro_includes "${_pro_includes} \"${_abs_include}\"")
+ set(_pro_includes "${_pro_includes} \\\n \"${_abs_include}\"")
endforeach()
- file(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}\nINCLUDEPATH = ${_pro_includes}\n")
+ file(WRITE ${_ts_pro} "SOURCES =${_pro_srcs}\nINCLUDEPATH =${_pro_includes}\n")
endif()
add_custom_command(OUTPUT ${_ts_file}
COMMAND ${QT_LUPDATE_EXECUTABLE}
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 833903e..64ec644 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 12)
-set(CMake_VERSION_TWEAK 20131016)
+set(CMake_VERSION_TWEAK 20131020)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 677f5b1..169ae9a 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -55,13 +55,6 @@ static const char * cmDocumentationOptions[][2] =
{"-R <package version>","override/define CPACK_PACKAGE_VERSION"},
{"-B <package directory>","override/define CPACK_PACKAGE_DIRECTORY"},
{"--vendor <vendor name>","override/define CPACK_PACKAGE_VENDOR"},
- {"--help-command cmd [file]", "Print help for a single command and exit."},
- {"--help-command-list [file]", "List available commands and exit."},
- {"--help-commands [file]", "Print help for all commands and exit."},
- {"--help-variable var [file]",
- "Print help for a single variable and exit."},
- {"--help-variable-list [file]", "List documented variables and exit."},
- {"--help-variables [file]", "Print help for all variables and exit."},
{0,0}
};
@@ -235,6 +228,7 @@ int main (int argc, char *argv[])
// This part is used for cpack documentation lookup as well.
cminst.AddCMakePaths();
+ doc.SetCMakeRoot(cminst.GetCacheDefinition("CMAKE_ROOT"));
if ( parsed && !help )
{
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 3855d53..fdfe331 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -86,6 +86,8 @@ int main(int argc, char** argv)
if(doc.CheckOptions(argc, argv))
{
cmake hcm;
+ hcm.AddCMakePaths();
+ doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT"));
std::vector<cmDocumentationEntry> generators;
hcm.GetGeneratorDocumentation(generators);
doc.SetName("ccmake");
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index cfefab2..095aeb6 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -58,12 +58,7 @@ int main(int argc, char** argv)
// Construct and print requested documentation.
cmake hcm;
hcm.AddCMakePaths();
- // just incase the install is bad avoid a seg fault
- const char* root = hcm.GetCacheDefinition("CMAKE_ROOT");
- if(root)
- {
- doc.SetCMakeRoot(root);
- }
+ doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT"));
std::vector<cmDocumentationEntry> generators;
hcm.GetGeneratorDocumentation(generators);
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 2d7feab..682478e 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -25,12 +25,44 @@
//----------------------------------------------------------------------------
static const char *cmDocumentationStandardOptions[][2] =
{
- {"--copyright [file]", "Print the CMake copyright and exit."},
- {"--help,-help,-usage,-h,-H,/?", "Print usage information and exit."},
- {"--help-full [file]", "Print full help and exit."},
- {"--help-html [file]", "Print full help in HTML format."},
- {"--help-man [file]", "Print full help as a UNIX man page and exit."},
- {"--version,-version,/V [file]"},
+ {"--help,-help,-usage,-h,-H,/?",
+ "Print usage information and exit."},
+ {"--version,-version,/V [<f>]",
+ "Print version number and exit."},
+ {"--help-manual <man> [<f>]",
+ "Print one help manual and exit."},
+ {"--help-manual-list [<f>]",
+ "List help manuals available and exit."},
+ {"--help-command <cmd> [<f>]",
+ "Print help for one command and exit."},
+ {"--help-command-list [<f>]",
+ "List commands with help available and exit."},
+ {"--help-commands [<f>]",
+ "Print cmake-commands manual and exit."},
+ {"--help-module <mod> [<f>]",
+ "Print help for one module and exit."},
+ {"--help-module-list [<f>]",
+ "List modules with help available and exit."},
+ {"--help-modules [<f>]",
+ "Print cmake-modules manual and exit."},
+ {"--help-policy <cmp> [<f>]",
+ "Print help for one policy and exit."},
+ {"--help-policy-list [<f>]",
+ "List policies with help available and exit."},
+ {"--help-policies [<f>]",
+ "Print cmake-policies manual and exit."},
+ {"--help-property <prop> [<f>]",
+ "Print help for one property and exit."},
+ {"--help-property-list [<f>]",
+ "List properties with help available and exit."},
+ {"--help-properties [<f>]",
+ "Print cmake-properties manual and exit."},
+ {"--help-variable var [<f>]",
+ "Print help for one variable and exit."},
+ {"--help-variable-list [<f>]",
+ "List variables with help available and exit."},
+ {"--help-variables [<f>]",
+ "Print cmake-variables manual and exit."},
{0,0}
};
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index a4072c5..07e614d 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -84,7 +84,7 @@ public:
cmDocumentationEntry &docs);
/** Set cmake root so we can find installed files */
- void SetCMakeRoot(const char* root) { this->CMakeRoot = root;}
+ void SetCMakeRoot(const char* root) { this->CMakeRoot = root? root:"";}
/** Add common (to all tools) documentation section(s) */
void addCommonStandardDocSections();
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 6ede28b..ffab8e5 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -19,14 +19,13 @@ public:
cmPolicy(cmPolicies::PolicyID iD,
const char *idString,
const char *shortDescription,
- const char *longDescription,
unsigned int majorVersionIntroduced,
unsigned int minorVersionIntroduced,
unsigned int patchVersionIntroduced,
unsigned int tweakVersionIntroduced,
cmPolicies::PolicyStatus status)
{
- if (!idString || !shortDescription || ! longDescription)
+ if (!idString || !shortDescription)
{
cmSystemTools::Error("Attempt to define a policy without "
"all parameters being specified!");
@@ -35,7 +34,6 @@ public:
this->ID = iD;
this->IDString = idString;
this->ShortDescription = shortDescription;
- this->LongDescription = longDescription;
this->MajorVersionIntroduced = majorVersionIntroduced;
this->MinorVersionIntroduced = minorVersionIntroduced;
this->PatchVersionIntroduced = patchVersionIntroduced;
@@ -90,7 +88,6 @@ public:
cmPolicies::PolicyID ID;
std::string IDString;
std::string ShortDescription;
- std::string LongDescription;
unsigned int MajorVersionIntroduced;
unsigned int MinorVersionIntroduced;
unsigned int PatchVersionIntroduced;
@@ -104,561 +101,146 @@ cmPolicies::cmPolicies()
this->DefinePolicy(
CMP0000, "CMP0000",
"A minimum required CMake version must be specified.",
- "CMake requires that projects specify the version of CMake to which "
- "they have been written. "
- "This policy has been put in place so users trying to build the project "
- "may be told when they need to update their CMake. "
- "Specifying a version also helps the project build with CMake versions "
- "newer than that specified. "
- "Use the cmake_minimum_required command at the top of your main "
- " CMakeLists.txt file:\n"
- " cmake_minimum_required(VERSION <major>.<minor>)\n"
- "where \"<major>.<minor>\" is the version of CMake you want to support "
- "(such as \"2.6\"). "
- "The command will ensure that at least the given version of CMake is "
- "running and help newer versions be compatible with the project. "
- "See documentation of cmake_minimum_required for details.\n"
- "Note that the command invocation must appear in the CMakeLists.txt "
- "file itself; a call in an included file is not sufficient. "
- "However, the cmake_policy command may be called to set policy "
- "CMP0000 to OLD or NEW behavior explicitly. "
- "The OLD behavior is to silently ignore the missing invocation. "
- "The NEW behavior is to issue an error instead of a warning. "
- "An included file may set CMP0000 explicitly to affect how this "
- "policy is enforced for the main CMakeLists.txt file.",
2,6,0,0, cmPolicies::WARN
);
this->DefinePolicy(
CMP0001, "CMP0001",
"CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.",
- "The OLD behavior is to check CMAKE_BACKWARDS_COMPATIBILITY and present "
- "it to the user. "
- "The NEW behavior is to ignore CMAKE_BACKWARDS_COMPATIBILITY "
- "completely.\n"
- "In CMake 2.4 and below the variable CMAKE_BACKWARDS_COMPATIBILITY was "
- "used to request compatibility with earlier versions of CMake. "
- "In CMake 2.6 and above all compatibility issues are handled by policies "
- "and the cmake_policy command. "
- "However, CMake must still check CMAKE_BACKWARDS_COMPATIBILITY for "
- "projects written for CMake 2.4 and below.",
2,6,0,0, cmPolicies::WARN
);
this->DefinePolicy(
CMP0002, "CMP0002",
"Logical target names must be globally unique.",
- "Targets names created with "
- "add_executable, add_library, or add_custom_target "
- "are logical build target names. "
- "Logical target names must be globally unique because:\n"
- " - Unique names may be referenced unambiguously both in CMake\n"
- " code and on make tool command lines.\n"
- " - Logical names are used by Xcode and VS IDE generators\n"
- " to produce meaningful project names for the targets.\n"
- "The logical name of executable and library targets does not "
- "have to correspond to the physical file names built. "
- "Consider using the OUTPUT_NAME target property to create two "
- "targets with the same physical name while keeping logical "
- "names distinct. "
- "Custom targets must simply have globally unique names (unless one "
- "uses the global property ALLOW_DUPLICATE_CUSTOM_TARGETS with a "
- "Makefiles generator).",
2,6,0,0, cmPolicies::WARN
);
this->DefinePolicy(
CMP0003, "CMP0003",
"Libraries linked via full path no longer produce linker search paths.",
- "This policy affects how libraries whose full paths are NOT known "
- "are found at link time, but was created due to a change in how CMake "
- "deals with libraries whose full paths are known. "
- "Consider the code\n"
- " target_link_libraries(myexe /path/to/libA.so)\n"
- "CMake 2.4 and below implemented linking to libraries whose full paths "
- "are known by splitting them on the link line into separate components "
- "consisting of the linker search path and the library name. "
- "The example code might have produced something like\n"
- " ... -L/path/to -lA ...\n"
- "in order to link to library A. "
- "An analysis was performed to order multiple link directories such that "
- "the linker would find library A in the desired location, but there "
- "are cases in which this does not work. "
- "CMake versions 2.6 and above use the more reliable approach of passing "
- "the full path to libraries directly to the linker in most cases. "
- "The example code now produces something like\n"
- " ... /path/to/libA.so ....\n"
- "Unfortunately this change can break code like\n"
- " target_link_libraries(myexe /path/to/libA.so B)\n"
- "where \"B\" is meant to find \"/path/to/libB.so\". "
- "This code is wrong because the user is asking the linker to find "
- "library B but has not provided a linker search path (which may be "
- "added with the link_directories command). "
- "However, with the old linking implementation the code would work "
- "accidentally because the linker search path added for library A "
- "allowed library B to be found."
- "\n"
- "In order to support projects depending on linker search paths "
- "added by linking to libraries with known full paths, the OLD "
- "behavior for this policy will add the linker search paths even "
- "though they are not needed for their own libraries. "
- "When this policy is set to OLD, CMake will produce a link line such as\n"
- " ... -L/path/to /path/to/libA.so -lB ...\n"
- "which will allow library B to be found as it was previously. "
- "When this policy is set to NEW, CMake will produce a link line such as\n"
- " ... /path/to/libA.so -lB ...\n"
- "which more accurately matches what the project specified."
- "\n"
- "The setting for this policy used when generating the link line is that "
- "in effect when the target is created by an add_executable or "
- "add_library command. For the example described above, the code\n"
- " cmake_policy(SET CMP0003 OLD) # or cmake_policy(VERSION 2.4)\n"
- " add_executable(myexe myexe.c)\n"
- " target_link_libraries(myexe /path/to/libA.so B)\n"
- "will work and suppress the warning for this policy. "
- "It may also be updated to work with the corrected linking approach:\n"
- " cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)\n"
- " link_directories(/path/to) # needed to find library B\n"
- " add_executable(myexe myexe.c)\n"
- " target_link_libraries(myexe /path/to/libA.so B)\n"
- "Even better, library B may be specified with a full path:\n"
- " add_executable(myexe myexe.c)\n"
- " target_link_libraries(myexe /path/to/libA.so /path/to/libB.so)\n"
- "When all items on the link line have known paths CMake does not check "
- "this policy so it has no effect.\n"
- "Note that the warning for this policy will be issued for at most "
- "one target. This avoids flooding users with messages for every "
- "target when setting the policy once will probably fix all targets.",
2,6,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0004, "CMP0004",
"Libraries linked may not have leading or trailing whitespace.",
- "CMake versions 2.4 and below silently removed leading and trailing "
- "whitespace from libraries linked with code like\n"
- " target_link_libraries(myexe \" A \")\n"
- "This could lead to subtle errors in user projects.\n"
- "The OLD behavior for this policy is to silently remove leading and "
- "trailing whitespace. "
- "The NEW behavior for this policy is to diagnose the existence of "
- "such whitespace as an error. "
- "The setting for this policy used when checking the library names is "
- "that in effect when the target is created by an add_executable or "
- "add_library command.",
2,6,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0005, "CMP0005",
"Preprocessor definition values are now escaped automatically.",
- "This policy determines whether or not CMake should generate escaped "
- "preprocessor definition values added via add_definitions. "
- "CMake versions 2.4 and below assumed that only trivial values would "
- "be given for macros in add_definitions calls. "
- "It did not attempt to escape non-trivial values such as string "
- "literals in generated build rules. "
- "CMake versions 2.6 and above support escaping of most values, but "
- "cannot assume the user has not added escapes already in an attempt to "
- "work around limitations in earlier versions.\n"
- "The OLD behavior for this policy is to place definition values given "
- "to add_definitions directly in the generated build rules without "
- "attempting to escape anything. "
- "The NEW behavior for this policy is to generate correct escapes "
- "for all native build tools automatically. "
- "See documentation of the COMPILE_DEFINITIONS target property for "
- "limitations of the escaping implementation.",
2,6,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0006, "CMP0006",
"Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.",
- "This policy determines whether the install(TARGETS) command must be "
- "given a BUNDLE DESTINATION when asked to install a target with the "
- "MACOSX_BUNDLE property set. "
- "CMake 2.4 and below did not distinguish application bundles from "
- "normal executables when installing targets. "
- "CMake 2.6 provides a BUNDLE option to the install(TARGETS) command "
- "that specifies rules specific to application bundles on the Mac. "
- "Projects should use this option when installing a target with the "
- "MACOSX_BUNDLE property set.\n"
- "The OLD behavior for this policy is to fall back to the RUNTIME "
- "DESTINATION if a BUNDLE DESTINATION is not given. "
- "The NEW behavior for this policy is to produce an error if a bundle "
- "target is installed without a BUNDLE DESTINATION.",
2,6,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0007, "CMP0007",
"list command no longer ignores empty elements.",
- "This policy determines whether the list command will "
- "ignore empty elements in the list. "
- "CMake 2.4 and below list commands ignored all empty elements"
- " in the list. For example, a;b;;c would have length 3 and not 4. "
- "The OLD behavior for this policy is to ignore empty list elements. "
- "The NEW behavior for this policy is to correctly count empty "
- "elements in a list. ",
2,6,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0008, "CMP0008",
"Libraries linked by full-path must have a valid library file name.",
- "In CMake 2.4 and below it is possible to write code like\n"
- " target_link_libraries(myexe /full/path/to/somelib)\n"
- "where \"somelib\" is supposed to be a valid library file name "
- "such as \"libsomelib.a\" or \"somelib.lib\". "
- "For Makefile generators this produces an error at build time "
- "because the dependency on the full path cannot be found. "
- "For VS IDE and Xcode generators this used to work by accident because "
- "CMake would always split off the library directory and ask the "
- "linker to search for the library by name (-lsomelib or somelib.lib). "
- "Despite the failure with Makefiles, some projects have code like this "
- "and build only with VS and/or Xcode. "
- "This version of CMake prefers to pass the full path directly to the "
- "native build tool, which will fail in this case because it does "
- "not name a valid library file."
- "\n"
- "This policy determines what to do with full paths that do not appear "
- "to name a valid library file. "
- "The OLD behavior for this policy is to split the library name from the "
- "path and ask the linker to search for it. "
- "The NEW behavior for this policy is to trust the given path and "
- "pass it directly to the native build tool unchanged.",
2,6,1,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0009, "CMP0009",
"FILE GLOB_RECURSE calls should not follow symlinks by default.",
- "In CMake 2.6.1 and below, FILE GLOB_RECURSE calls would follow "
- "through symlinks, sometimes coming up with unexpectedly large "
- "result sets because of symlinks to top level directories that "
- "contain hundreds of thousands of files."
- "\n"
- "This policy determines whether or not to follow symlinks "
- "encountered during a FILE GLOB_RECURSE call. "
- "The OLD behavior for this policy is to follow the symlinks. "
- "The NEW behavior for this policy is not to follow the symlinks "
- "by default, but only if FOLLOW_SYMLINKS is given as an additional "
- "argument to the FILE command.",
2,6,2,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0010, "CMP0010",
"Bad variable reference syntax is an error.",
- "In CMake 2.6.2 and below, incorrect variable reference syntax such as "
- "a missing close-brace (\"${FOO\") was reported but did not stop "
- "processing of CMake code. "
- "This policy determines whether a bad variable reference is an error. "
- "The OLD behavior for this policy is to warn about the error, leave "
- "the string untouched, and continue. "
- "The NEW behavior for this policy is to report an error.",
2,6,3,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0011, "CMP0011",
"Included scripts do automatic cmake_policy PUSH and POP.",
- "In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by "
- "the include() and find_package() commands would affect the includer. "
- "Explicit invocations of cmake_policy(PUSH) and cmake_policy(POP) were "
- "required to isolate policy changes and protect the includer. "
- "While some scripts intend to affect the policies of their includer, "
- "most do not. "
- "In CMake 2.6.3 and above, include() and find_package() by default PUSH "
- "and POP an entry on the policy stack around an included script, "
- "but provide a NO_POLICY_SCOPE option to disable it. "
- "This policy determines whether or not to imply NO_POLICY_SCOPE for "
- "compatibility. "
- "The OLD behavior for this policy is to imply NO_POLICY_SCOPE for "
- "include() and find_package() commands. "
- "The NEW behavior for this policy is to allow the commands to do their "
- "default cmake_policy PUSH and POP.",
2,6,3,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0012, "CMP0012",
"if() recognizes numbers and boolean constants.",
- "In CMake versions 2.6.4 and lower the if() command implicitly "
- "dereferenced arguments corresponding to variables, even those named "
- "like numbers or boolean constants, except for 0 and 1. "
- "Numbers and boolean constants such as true, false, yes, no, "
- "on, off, y, n, notfound, ignore (all case insensitive) were recognized "
- "in some cases but not all. "
- "For example, the code \"if(TRUE)\" might have evaluated as false. "
- "Numbers such as 2 were recognized only in "
- "boolean expressions like \"if(NOT 2)\" (leading to false) "
- "but not as a single-argument like \"if(2)\" (also leading to false). "
- "Later versions of CMake prefer to treat numbers and boolean constants "
- "literally, so they should not be used as variable names."
- "\n"
- "The OLD behavior for this policy is to implicitly dereference variables "
- "named like numbers and boolean constants. "
- "The NEW behavior for this policy is to recognize numbers and "
- "boolean constants without dereferencing variables with such names.",
2,8,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0013, "CMP0013",
"Duplicate binary directories are not allowed.",
- "CMake 2.6.3 and below silently permitted add_subdirectory() calls "
- "to create the same binary directory multiple times. "
- "During build system generation files would be written and then "
- "overwritten in the build tree and could lead to strange behavior. "
- "CMake 2.6.4 and above explicitly detect duplicate binary directories. "
- "CMake 2.6.4 always considers this case an error. "
- "In CMake 2.8.0 and above this policy determines whether or not "
- "the case is an error. "
- "The OLD behavior for this policy is to allow duplicate binary "
- "directories. "
- "The NEW behavior for this policy is to disallow duplicate binary "
- "directories with an error.",
2,8,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0014, "CMP0014",
"Input directories must have CMakeLists.txt.",
- "CMake versions before 2.8 silently ignored missing CMakeLists.txt "
- "files in directories referenced by add_subdirectory() or subdirs(), "
- "treating them as if present but empty. "
- "In CMake 2.8.0 and above this policy determines whether or not "
- "the case is an error. "
- "The OLD behavior for this policy is to silently ignore the problem. "
- "The NEW behavior for this policy is to report an error.",
2,8,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0015, "CMP0015",
"link_directories() treats paths relative to the source dir.",
- "In CMake 2.8.0 and lower the link_directories() command passed relative "
- "paths unchanged to the linker. "
- "In CMake 2.8.1 and above the link_directories() command prefers to "
- "interpret relative paths with respect to CMAKE_CURRENT_SOURCE_DIR, "
- "which is consistent with include_directories() and other commands. "
- "The OLD behavior for this policy is to use relative paths verbatim in "
- "the linker command. "
- "The NEW behavior for this policy is to convert relative paths to "
- "absolute paths by appending the relative path to "
- "CMAKE_CURRENT_SOURCE_DIR.",
2,8,1,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0016, "CMP0016",
"target_link_libraries() reports error if its only argument "
"is not a target.",
- "In CMake 2.8.2 and lower the target_link_libraries() command silently "
- "ignored if it was called with only one argument, and this argument "
- "wasn't a valid target. "
- "In CMake 2.8.3 and above it reports an error in this case.",
2,8,3,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0017, "CMP0017",
"Prefer files from the CMake module directory when including from there.",
- "Starting with CMake 2.8.4, if a cmake-module shipped with CMake (i.e. "
- "located in the CMake module directory) calls include() or "
- "find_package(), the files located in the CMake module directory are "
- "preferred over the files in CMAKE_MODULE_PATH. "
- "This makes sure that the modules belonging to "
- "CMake always get those files included which they expect, and against "
- "which they were developed and tested. "
- "In all other cases, the files found in "
- "CMAKE_MODULE_PATH still take precedence over the ones in "
- "the CMake module directory. "
- "The OLD behaviour is to always prefer files from CMAKE_MODULE_PATH over "
- "files from the CMake modules directory.",
2,8,4,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0018, "CMP0018",
"Ignore CMAKE_SHARED_LIBRARY_<Lang>_FLAGS variable.",
- "CMake 2.8.8 and lower compiled sources in SHARED and MODULE libraries "
- "using the value of the undocumented CMAKE_SHARED_LIBRARY_<Lang>_FLAGS "
- "platform variable. The variable contained platform-specific flags "
- "needed to compile objects for shared libraries. Typically it included "
- "a flag such as -fPIC for position independent code but also included "
- "other flags needed on certain platforms. CMake 2.8.9 and higher "
- "prefer instead to use the POSITION_INDEPENDENT_CODE target property to "
- "determine what targets should be position independent, and new "
- "undocumented platform variables to select flags while ignoring "
- "CMAKE_SHARED_LIBRARY_<Lang>_FLAGS completely."
- "\n"
- "The default for either approach produces identical compilation flags, "
- "but if a project modifies CMAKE_SHARED_LIBRARY_<Lang>_FLAGS from its "
- "original value this policy determines which approach to use."
- "\n"
- "The OLD behavior for this policy is to ignore the "
- "POSITION_INDEPENDENT_CODE property for all targets and use the modified "
- "value of CMAKE_SHARED_LIBRARY_<Lang>_FLAGS for SHARED and MODULE "
- "libraries."
- "\n"
- "The NEW behavior for this policy is to ignore "
- "CMAKE_SHARED_LIBRARY_<Lang>_FLAGS whether it is modified or not and "
- "honor the POSITION_INDEPENDENT_CODE target property.",
2,8,9,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0019, "CMP0019",
"Do not re-expand variables in include and link information.",
- "CMake 2.8.10 and lower re-evaluated values given to the "
- "include_directories, link_directories, and link_libraries "
- "commands to expand any leftover variable references at the "
- "end of the configuration step. "
- "This was for strict compatibility with VERY early CMake versions "
- "because all variable references are now normally evaluated during "
- "CMake language processing. "
- "CMake 2.8.11 and higher prefer to skip the extra evaluation."
- "\n"
- "The OLD behavior for this policy is to re-evaluate the values "
- "for strict compatibility. "
- "The NEW behavior for this policy is to leave the values untouched.",
2,8,11,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0020, "CMP0020",
"Automatically link Qt executables to qtmain target on Windows.",
- "CMake 2.8.10 and lower required users of Qt to always specify a link "
- "dependency to the qtmain.lib static library manually on Windows. CMake "
- "2.8.11 gained the ability to evaluate generator expressions while "
- "determining the link dependencies from IMPORTED targets. This allows "
- "CMake itself to automatically link executables which link to Qt to the "
- "qtmain.lib library when using IMPORTED Qt targets. For applications "
- "already linking to qtmain.lib, this should have little impact. For "
- "applications which supply their own alternative WinMain implementation "
- "and for applications which use the QAxServer library, this automatic "
- "linking will need to be disabled as per the documentation."
- "\n"
- "The OLD behavior for this policy is not to link executables to "
- "qtmain.lib automatically when they link to the QtCore IMPORTED"
- "target. "
- "The NEW behavior for this policy is to link executables to "
- "qtmain.lib automatically when they link to QtCore IMPORTED target.",
2,8,11,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0021, "CMP0021",
"Fatal error on relative paths in INCLUDE_DIRECTORIES target property.",
- "CMake 2.8.10.2 and lower allowed the INCLUDE_DIRECTORIES target "
- "property to contain relative paths. The base path for such relative "
- "entries is not well defined. CMake 2.8.12 issues a FATAL_ERROR if the "
- "INCLUDE_DIRECTORIES property contains a relative path."
- "\n"
- "The OLD behavior for this policy is not to warn about relative paths in "
- "the INCLUDE_DIRECTORIES target property. "
- "The NEW behavior for this policy is to issue a FATAL_ERROR if "
- "INCLUDE_DIRECTORIES contains a relative path.",
2,8,12,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0022, "CMP0022",
"INTERFACE_LINK_LIBRARIES defines the link interface.",
- "CMake 2.8.11 constructed the 'link interface' of a target from "
- "properties matching (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?. "
- "The modern way to specify config-sensitive content is to use generator "
- "expressions and the IMPORTED_ prefix makes uniform processing of the "
- "link interface with generator expressions impossible. The "
- "INTERFACE_LINK_LIBRARIES target property was introduced as a "
- "replacement in CMake 2.8.12. This new property is named consistently "
- "with the INTERFACE_COMPILE_DEFINITIONS, INTERFACE_INCLUDE_DIRECTORIES "
- "and INTERFACE_COMPILE_OPTIONS properties. For in-build targets, CMake "
- "will use the INTERFACE_LINK_LIBRARIES property as the source of the "
- "link interface only if policy CMP0022 is NEW. "
- "When exporting a target which has this policy set to NEW, only the "
- "INTERFACE_LINK_LIBRARIES property will be processed and generated for "
- "the IMPORTED target by default. A new option to the install(EXPORT) "
- "and export commands allows export of the old-style properties for "
- "compatibility with downstream users of CMake versions older than "
- "2.8.12. "
- "The target_link_libraries command will no longer populate the "
- "properties matching LINK_INTERFACE_LIBRARIES(_<CONFIG>)? if this policy "
- "is NEW."
- "\n"
- "The OLD behavior for this policy is to ignore the "
- "INTERFACE_LINK_LIBRARIES property for in-build targets. "
- "The NEW behavior for this policy is to use the INTERFACE_LINK_LIBRARIES "
- "property for in-build targets, and ignore the old properties matching "
- "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?.",
2,8,12,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0023, "CMP0023",
"Plain and keyword target_link_libraries signatures cannot be mixed.",
- "CMake 2.8.12 introduced the target_link_libraries signature using "
- "the PUBLIC, PRIVATE, and INTERFACE keywords to generalize the "
- "LINK_PUBLIC and LINK_PRIVATE keywords introduced in CMake 2.8.7. "
- "Use of signatures with any of these keywords sets the link interface "
- "of a target explicitly, even if empty. "
- "This produces confusing behavior when used in combination with the "
- "historical behavior of the plain target_link_libraries signature. "
- "For example, consider the code:\n"
- " target_link_libraries(mylib A)\n"
- " target_link_libraries(mylib PRIVATE B)\n"
- "After the first line the link interface has not been set explicitly "
- "so CMake would use the link implementation, A, as the link interface. "
- "However, the second line sets the link interface to empty. "
- "In order to avoid this subtle behavior CMake now prefers to disallow "
- "mixing the plain and keyword signatures of target_link_libraries for "
- "a single target."
- "\n"
- "The OLD behavior for this policy is to allow keyword and plain "
- "target_link_libraries signatures to be mixed. "
- "The NEW behavior for this policy is to not to allow mixing of the "
- "keyword and plain signatures.",
2,8,12,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0024, "CMP0024",
"Disallow include export result.",
- "CMake 2.8.12 and lower allowed use of the include() command with the "
- "result of the export() command. This relies on the assumption that "
- "the export() command has an immediate effect at configure-time during a "
- "cmake run. Certain properties of targets are not fully determined "
- "until later at generate-time, such as the link language and complete "
- "list of link libraries. Future refactoring will change the effect of "
- "the export() command to be executed at generate-time. Use ALIAS "
- "targets instead in cases where the goal is to refer to targets by "
- "another name"
- "\n"
- "The OLD behavior for this policy is to allow including the result "
- "of an export() command. "
- "The NEW behavior for this policy is to not to allow including the "
- "result of an export() command.",
- 2,8,13,0, cmPolicies::WARN);
+ 3,0,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0025, "CMP0025",
"Compiler id for Apple Clang is now AppleClang.",
- "CMake >= 2.8.13 recognize that Apple Clang is a different compiler "
- "than upstream Clang and that they have different version numbers. "
- "CMake now prefers to present this to projects by setting "
- "CMAKE_<LANG>_COMPILER_ID to \"AppleClang\" instead of \"Clang\". "
- "However, existing projects may assume the compiler id for Apple Clang "
- "is just \"Clang\" as it was in CMake < 2.8.13. "
- "Therefore this policy determines for Apple Clang which compiler id "
- "to report in CMAKE_<LANG>_COMPILER_ID after <LANG> is enabled by "
- "the project() or enable_language() command."
- "\n"
- "The OLD behavior for this policy is to use compiler id \"Clang\". "
- "The NEW behavior for this policy is to use compiler id \"AppleClang\".",
- 2,8,13,0, cmPolicies::WARN);
+ 3,0,0,0, cmPolicies::WARN);
this->DefinePolicy(
CMP0026, "CMP0026",
"Disallow use of the LOCATION target property.",
- "CMake 2.8.12 and lower allowed reading the LOCATION target property to "
- "determine the eventual location of build targets. This relies on the "
- "assumption that all necessary information is available at "
- "configure-time to determine the final location and filename of the "
- "target. However, this property is not fully determined until later at "
- "generate-time. At generate time, the $<TARGET_FILE> generator "
- "expression can be used to determine the eventual LOCATION of a target "
- "output."
- "\n"
- "Code which reads the LOCATION target property can be ported to use the "
- "$<TARGET_FILE> generator expression together with the file(GENERATE) "
- "subcommand to generate a file containing the target location."
- "\n"
- "The OLD behavior for this policy is to allow reading the LOCATION "
- "property from build-targets. "
- "The NEW behavior for this policy is to not to allow reading the "
- "LOCATION property from build-targets.",
- 2,8,13,0, cmPolicies::WARN);
+ 3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0027, "CMP0027",
+ "Conditionally linked imported targets with missing include directories.",
+ 3,0,0,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
@@ -675,7 +257,6 @@ cmPolicies::~cmPolicies()
void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD,
const char *idString,
const char *shortDescription,
- const char *longDescription,
unsigned int majorVersionIntroduced,
unsigned int minorVersionIntroduced,
unsigned int patchVersionIntroduced,
@@ -692,7 +273,6 @@ void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD,
this->Policies[iD] = new cmPolicy(iD, idString,
shortDescription,
- longDescription,
majorVersionIntroduced,
minorVersionIntroduced,
patchVersionIntroduced,
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index a9d1b49..39c2afb 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -77,6 +77,8 @@ public:
CMP0024, ///< Disallow including export() result.
CMP0025, ///< Compiler id for Apple Clang is now AppleClang
CMP0026, ///< Disallow use of the LOCATION target property.
+ CMP0027, ///< Conditionally linked imported targets with missing include
+ /// directories.
/** \brief Always the last entry.
*
@@ -97,7 +99,6 @@ public:
void DefinePolicy(cmPolicies::PolicyID id,
const char *stringID,
const char *shortDescription,
- const char *longDescription,
unsigned int majorVersionIntroduced,
unsigned int minorVersionIntroduced,
unsigned int patchVersionIntroduced,
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index 72c42d6..18a197b 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -12,6 +12,7 @@
#include "cmRST.h"
#include "cmSystemTools.h"
+#include "cmVersion.h"
#include <ctype.h>
@@ -41,6 +42,7 @@ cmRST::cmRST(std::ostream& os, std::string const& docroot):
"((\\|[^| \t\r\n]([^|\r\n]*[^| \t\r\n])?\\|)(__|_|))"
"([^A-Za-z0-9_]|$)")
{
+ this->Replace["|release|"] = cmVersion::GetCMakeVersion();
}
//----------------------------------------------------------------------------
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5e10e25..b6182ab 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1911,19 +1911,56 @@ static void processIncludeDirectories(cmTarget *tgt,
}
}
std::string usedIncludes;
+ cmListFileBacktrace lfbt;
for(std::vector<std::string>::iterator
li = entryIncludes.begin(); li != entryIncludes.end(); ++li)
{
- cmTarget *dependentTarget =
- mf->FindTargetToUse((*it)->TargetName.c_str());
+ std::string targetName = (*it)->TargetName;
+ std::string evaluatedTargetName;
+ {
+ cmGeneratorExpression ge(lfbt);
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(targetName);
+ evaluatedTargetName = cge->Evaluate(mf, config, false, tgt, 0, 0);
+ }
+
+ cmTarget *dependentTarget = mf->FindTargetToUse(targetName.c_str());
const bool fromImported = dependentTarget
&& dependentTarget->IsImported();
- if (fromImported && !cmSystemTools::FileExists(li->c_str()))
+ cmTarget *evaluatedDependentTarget =
+ (targetName != evaluatedTargetName)
+ ? mf->FindTargetToUse(evaluatedTargetName.c_str())
+ : 0;
+
+ targetName = evaluatedTargetName;
+
+ const bool fromEvaluatedImported = evaluatedDependentTarget
+ && evaluatedDependentTarget->IsImported();
+
+ if ((fromImported || fromEvaluatedImported)
+ && !cmSystemTools::FileExists(li->c_str()))
{
cmOStringStream e;
- e << "Imported target \"" << (*it)->TargetName << "\" includes "
+ cmake::MessageType messageType = cmake::FATAL_ERROR;
+ if (fromEvaluatedImported)
+ {
+ switch(mf->GetPolicyStatus(cmPolicies::CMP0027))
+ {
+ case cmPolicies::WARN:
+ e << (mf->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0027)) << "\n";
+ case cmPolicies::OLD:
+ messageType = cmake::AUTHOR_WARNING;
+ break;
+ case cmPolicies::REQUIRED_ALWAYS:
+ case cmPolicies::REQUIRED_IF_USED:
+ case cmPolicies::NEW:
+ break;
+ }
+ }
+ e << "Imported target \"" << targetName << "\" includes "
"non-existent path\n \"" << *li << "\"\nin its "
"INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:\n"
"* The path was deleted, renamed, or moved to another "
@@ -1932,7 +1969,7 @@ static void processIncludeDirectories(cmTarget *tgt,
"successfully.\n"
"* The installation package was faulty and references files it "
"does not provide.\n";
- tgt->GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ tgt->GetMakefile()->IssueMessage(messageType, e.str().c_str());
return;
}
@@ -1941,9 +1978,9 @@ static void processIncludeDirectories(cmTarget *tgt,
cmOStringStream e;
bool noMessage = false;
cmake::MessageType messageType = cmake::FATAL_ERROR;
- if (!(*it)->TargetName.empty())
+ if (!targetName.empty())
{
- e << "Target \"" << (*it)->TargetName << "\" contains relative "
+ e << "Target \"" << targetName << "\" contains relative "
"path in its INTERFACE_INCLUDE_DIRECTORIES:\n"
" \"" << *li << "\"";
}
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 22f6a03..0707c62 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -151,7 +151,8 @@ bool cmTargetLinkLibrariesCommand
else if(args[i] == "LINK_PUBLIC")
{
if(i != 1
- && this->CurrentProcessingState != ProcessingPlainPrivateInterface)
+ && this->CurrentProcessingState != ProcessingPlainPrivateInterface
+ && this->CurrentProcessingState != ProcessingPlainPublicInterface)
{
this->Makefile->IssueMessage(
cmake::FATAL_ERROR,
@@ -181,7 +182,8 @@ bool cmTargetLinkLibrariesCommand
else if(args[i] == "LINK_PRIVATE")
{
if(i != 1
- && this->CurrentProcessingState != ProcessingPlainPublicInterface)
+ && this->CurrentProcessingState != ProcessingPlainPublicInterface
+ && this->CurrentProcessingState != ProcessingPlainPrivateInterface)
{
this->Makefile->IssueMessage(
cmake::FATAL_ERROR,
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 6e2125f..5113a75 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -79,32 +79,22 @@ static const char * cmDocumentationOptions[][2] =
{"--no-warn-unused-cli", "Don't warn about command line options."},
{"--check-system-vars", "Find problems with variable usage in system "
"files."},
- {"--help-command cmd [file]", "Print help for a single command and exit."},
- {"--help-command-list [file]", "List available listfile commands and exit."},
- {"--help-commands [file]", "Print help for all commands and exit."},
- {"--help-compatcommands [file]", "Print help for compatibility commands. "},
- {"--help-module module [file]", "Print help for a single module and exit."},
- {"--help-module-list [file]", "List available modules and exit."},
- {"--help-modules [file]", "Print help for all modules and exit."},
- {"--help-custom-modules [file]" , "Print help for all custom modules and "
- "exit."},
- {"--help-policy cmp [file]",
- "Print help for a single policy and exit."},
- {"--help-policy-list [file]", "List available policies and exit."},
- {"--help-policies [file]", "Print help for all policies and exit."},
- {"--help-property prop [file]",
- "Print help for a single property and exit."},
- {"--help-property-list [file]", "List available properties and exit."},
- {"--help-properties [file]", "Print help for all properties and exit."},
- {"--help-variable var [file]",
- "Print help for a single variable and exit."},
- {"--help-variable-list [file]", "List documented variables and exit."},
- {"--help-variables [file]", "Print help for all variables and exit."},
{0,0}
};
#endif
+static int do_command(int ac, char** av)
+{
+ std::vector<std::string> args;
+ args.push_back(av[0]);
+ for(int i = 2; i < ac; ++i)
+ {
+ args.push_back(av[i]);
+ }
+ return cmcmd::ExecuteCMakeCommand(args);
+}
+
int do_cmake(int ac, char** av);
static int do_build(int ac, char** av);
@@ -178,9 +168,16 @@ int main(int ac, char** av)
{
cmSystemTools::EnableMSVCDebugHook();
cmSystemTools::FindExecutableDirectory(av[0]);
- if(ac > 1 && strcmp(av[1], "--build") == 0)
+ if(ac > 1)
{
- return do_build(ac, av);
+ if(strcmp(av[1], "--build") == 0)
+ {
+ return do_build(ac, av);
+ }
+ else if(strcmp(av[1], "-E") == 0)
+ {
+ return do_command(ac, av);
+ }
}
int ret = do_cmake(ac, av);
#ifdef CMAKE_BUILD_WITH_CMAKE
@@ -201,7 +198,7 @@ int do_cmake(int ac, char** av)
#ifdef CMAKE_BUILD_WITH_CMAKE
cmDocumentation doc;
doc.addCMakeStandardDocSections();
- if(doc.CheckOptions(ac, av, "-E"))
+ if(doc.CheckOptions(ac, av))
{
// Construct and print requested documentation.
cmake hcm;
@@ -241,7 +238,6 @@ int do_cmake(int ac, char** av)
bool wiz = false;
bool sysinfo = false;
- bool command = false;
bool list_cached = false;
bool list_all_cached = false;
bool list_help = false;
@@ -250,43 +246,37 @@ int do_cmake(int ac, char** av)
std::vector<std::string> args;
for(int i =0; i < ac; ++i)
{
- if(!command && strcmp(av[i], "-i") == 0)
+ if(strcmp(av[i], "-i") == 0)
{
wiz = true;
}
- else if(!command && strcmp(av[i], "--system-information") == 0)
+ else if(strcmp(av[i], "--system-information") == 0)
{
sysinfo = true;
}
- // if command has already been set, then
- // do not eat the -E
- else if (!command && strcmp(av[i], "-E") == 0)
- {
- command = true;
- }
- else if (!command && strcmp(av[i], "-N") == 0)
+ else if (strcmp(av[i], "-N") == 0)
{
view_only = true;
}
- else if (!command && strcmp(av[i], "-L") == 0)
+ else if (strcmp(av[i], "-L") == 0)
{
list_cached = true;
}
- else if (!command && strcmp(av[i], "-LA") == 0)
+ else if (strcmp(av[i], "-LA") == 0)
{
list_all_cached = true;
}
- else if (!command && strcmp(av[i], "-LH") == 0)
+ else if (strcmp(av[i], "-LH") == 0)
{
list_cached = true;
list_help = true;
}
- else if (!command && strcmp(av[i], "-LAH") == 0)
+ else if (strcmp(av[i], "-LAH") == 0)
{
list_all_cached = true;
list_help = true;
}
- else if (!command && strncmp(av[i], "-P", strlen("-P")) == 0)
+ else if (strncmp(av[i], "-P", strlen("-P")) == 0)
{
if ( i == ac -1 )
{
@@ -300,8 +290,8 @@ int do_cmake(int ac, char** av)
args.push_back(av[i]);
}
}
- else if (!command && strncmp(av[i], "--find-package",
- strlen("--find-package")) == 0)
+ else if (strncmp(av[i], "--find-package",
+ strlen("--find-package")) == 0)
{
workingMode = cmake::FIND_PACKAGE_MODE;
args.push_back(av[i]);
@@ -311,11 +301,6 @@ int do_cmake(int ac, char** av)
args.push_back(av[i]);
}
}
- if(command)
- {
- int ret = cmcmd::ExecuteCMakeCommand(args);
- return ret;
- }
if (wiz)
{
cmakewizard wizard;
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 6e3a86b..16cdd13 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -107,10 +107,6 @@ static const char * cmDocumentationOptions[][2] =
{"--http1.0", "Submit using HTTP 1.0."},
{"--no-compress-output", "Do not compress test output when submitting."},
{"--print-labels", "Print all available test labels."},
- {"--help-command <cmd> [<file>]",
- "Show help for a single command and exit."},
- {"--help-command-list [<file>]", "List available commands and exit."},
- {"--help-commands [<file>]", "Print help for all commands and exit."},
{0,0}
};
@@ -153,6 +149,10 @@ int main (int argc, char *argv[])
doc.addCTestStandardDocSections();
if(doc.CheckOptions(argc, argv))
{
+ cmake hcm;
+ hcm.AddCMakePaths();
+ doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT"));
+
// Construct and print requested documentation.
cmCTestScriptHandler* ch =
static_cast<cmCTestScriptHandler*>(inst.GetHandler("script"));
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 7c31f3a..2672730 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -88,6 +88,15 @@ typedef int siginfo_t;
# include <ifaddrs.h>
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
# endif
+# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
+# include <execinfo.h>
+# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
+# include <cxxabi.h>
+# endif
+# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
+# include <dlfcn.h>
+# endif
+# endif
#endif
#if defined(__OpenBSD__) || defined(__NetBSD__)
diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in
index f4510bb..03916bf 100644
--- a/Templates/TestDriver.cxx.in
+++ b/Templates/TestDriver.cxx.in
@@ -137,6 +137,13 @@ int main(int ac, char *av[])
{
int result;
@CMAKE_TESTDRIVER_BEFORE_TESTMAIN@
+ if (testToRun < 0 || testToRun >= NumTests)
+ {
+ printf(
+ "testToRun was modified by TestDriver code to an invalid value: %3d.\n",
+ testNum);
+ return -1;
+ }
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
@CMAKE_TESTDRIVER_AFTER_TESTMAIN@
return result;
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
index 06019e6..e11f980 100644
--- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
@@ -32,7 +32,7 @@ generate_export_header(depA)
add_library(depB SHARED depB.cpp)
generate_export_header(depB)
-target_link_libraries(depB LINK_PRIVATE depA)
+target_link_libraries(depB LINK_PRIVATE depA LINK_PRIVATE depA)
add_library(libgenex SHARED libgenex.cpp)
generate_export_header(libgenex)
@@ -44,11 +44,11 @@ set_property(TARGET depB APPEND PROPERTY
add_library(depC SHARED depC.cpp)
generate_export_header(depC)
-target_link_libraries(depC LINK_PUBLIC depA)
+target_link_libraries(depC LINK_PUBLIC depA LINK_PUBLIC depA)
assert_property(depA LINK_INTERFACE_LIBRARIES "")
assert_property(depB LINK_INTERFACE_LIBRARIES "")
-assert_property(depC LINK_INTERFACE_LIBRARIES "depA")
+assert_property(depC LINK_INTERFACE_LIBRARIES "depA;depA")
add_executable(targetA targetA.cpp)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-result.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
new file mode 100644
index 0000000..6d519f0
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
@@ -0,0 +1,17 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
+ interface. Run "cmake --help-policy CMP0022" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+
+ Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its
+ LINK_INTERFACE_LIBRARIES properties.
+
+ INTERFACE_LINK_LIBRARIES:
+
+ foo
+
+ LINK_INTERFACE_LIBRARIES:
+
+ \(empty\)
+
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake
new file mode 100644
index 0000000..c5d3c29
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old.cmake
@@ -0,0 +1,10 @@
+
+project(CMP0022-WARN-empty-old)
+
+add_library(foo SHARED empty_vs6_1.cpp)
+add_library(bar SHARED empty_vs6_2.cpp)
+
+set_property(TARGET bar PROPERTY INTERFACE_LINK_LIBRARIES foo)
+
+add_library(user empty.cpp)
+target_link_libraries(user bar)
diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
index dcef0f5..8e5824a 100644
--- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
@@ -3,6 +3,7 @@ include(RunCMake)
run_cmake(CMP0022-WARN)
run_cmake(CMP0022-WARN-tll)
run_cmake(CMP0022-WARN-static)
+run_cmake(CMP0022-WARN-empty-old)
run_cmake(CMP0022-NOWARN-static)
run_cmake(CMP0022-NOWARN-static-link_libraries)
run_cmake(CMP0022-export)
diff --git a/Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt b/Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt b/Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt
new file mode 100644
index 0000000..5948ec8
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-NEW-stderr.txt
@@ -0,0 +1,13 @@
+CMake Error in CMakeLists.txt:
+ Imported target "testTarget" includes non-existent path
+
+ "/does/not/exist"
+
+ in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
+
+ \* The path was deleted, renamed, or moved to another location.
+
+ \* An install or uninstall procedure did not complete successfully.
+
+ \* The installation package was faulty and references files it does not
+ provide.
diff --git a/Tests/RunCMake/CMP0027/CMP0027-NEW.cmake b/Tests/RunCMake/CMP0027/CMP0027-NEW.cmake
new file mode 100644
index 0000000..8245085
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-NEW.cmake
@@ -0,0 +1,10 @@
+
+enable_language(CXX)
+
+cmake_policy(SET CMP0027 NEW)
+
+add_library(testTarget UNKNOWN IMPORTED)
+set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "/does/not/exist")
+
+add_library(userTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
+target_link_libraries(userTarget PRIVATE $<1:testTarget>)
diff --git a/Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt b/Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-OLD-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt b/Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt
new file mode 100644
index 0000000..4c2b300
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-OLD-stderr.txt
@@ -0,0 +1,13 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+ Imported target "testTarget" includes non-existent path
+
+ "/does/not/exist"
+
+ in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
+
+ \* The path was deleted, renamed, or moved to another location.
+
+ \* An install or uninstall procedure did not complete successfully.
+
+ \* The installation package was faulty and references files it does not
+ provide.
diff --git a/Tests/RunCMake/CMP0027/CMP0027-OLD.cmake b/Tests/RunCMake/CMP0027/CMP0027-OLD.cmake
new file mode 100644
index 0000000..404217d
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-OLD.cmake
@@ -0,0 +1,10 @@
+
+enable_language(CXX)
+
+cmake_policy(SET CMP0027 OLD)
+
+add_library(testTarget UNKNOWN IMPORTED)
+set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "/does/not/exist")
+
+add_library(userTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
+target_link_libraries(userTarget PRIVATE $<1:testTarget>)
diff --git a/Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt b/Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-WARN-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt b/Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt
new file mode 100644
index 0000000..9bcec3c
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-WARN-stderr.txt
@@ -0,0 +1,18 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0027 is not set: Conditionally linked imported targets with
+ missing include directories. Run "cmake --help-policy CMP0027" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
+
+ Imported target "testTarget" includes non-existent path
+
+ "/does/not/exist"
+
+ in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
+
+ \* The path was deleted, renamed, or moved to another location.
+
+ \* An install or uninstall procedure did not complete successfully.
+
+ \* The installation package was faulty and references files it does not
+ provide.
diff --git a/Tests/RunCMake/CMP0027/CMP0027-WARN.cmake b/Tests/RunCMake/CMP0027/CMP0027-WARN.cmake
new file mode 100644
index 0000000..8e5f9b5
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMP0027-WARN.cmake
@@ -0,0 +1,8 @@
+
+enable_language(CXX)
+
+add_library(testTarget UNKNOWN IMPORTED)
+set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "/does/not/exist")
+
+add_library(userTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
+target_link_libraries(userTarget PRIVATE $<1:testTarget>)
diff --git a/Tests/RunCMake/CMP0027/CMakeLists.txt b/Tests/RunCMake/CMP0027/CMakeLists.txt
new file mode 100644
index 0000000..8f85fbf
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8.4)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/CMP0027/RunCMakeTest.cmake b/Tests/RunCMake/CMP0027/RunCMakeTest.cmake
new file mode 100644
index 0000000..1017f01
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(CMP0027-NEW)
+run_cmake(CMP0027-OLD)
+run_cmake(CMP0027-WARN)
diff --git a/Tests/RunCMake/CMP0027/empty.cpp b/Tests/RunCMake/CMP0027/empty.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CMP0027/empty.cpp
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 6d5b07b..52c8667 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -54,6 +54,7 @@ endif()
add_RunCMake_test(CMP0019)
add_RunCMake_test(CMP0022)
add_RunCMake_test(CMP0026)
+add_RunCMake_test(CMP0027)
add_RunCMake_test(CTest)
if(UNIX AND "${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles")
add_RunCMake_test(CompilerChange)