summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/build_name.rst4
-rw-r--r--Help/command/export_library_dependencies.rst4
-rw-r--r--Help/command/load_command.rst2
-rw-r--r--Help/command/output_required_files.rst4
-rw-r--r--Help/command/subdir_depends.rst4
-rw-r--r--Help/command/use_mangled_mesa.rst2
-rw-r--r--Help/command/utility_source.rst2
-rw-r--r--Help/command/variable_requires.rst4
-rw-r--r--Help/index.rst1
-rw-r--r--Help/manual/cmake-developer.7.rst497
-rw-r--r--Help/manual/cmake-policies.7.rst8
-rw-r--r--Help/policy/CMP0029.rst10
-rw-r--r--Help/policy/CMP0030.rst11
-rw-r--r--Help/policy/CMP0031.rst13
-rw-r--r--Help/policy/CMP0032.rst13
-rw-r--r--Help/policy/CMP0033.rst14
-rw-r--r--Help/policy/CMP0034.rst11
-rw-r--r--Help/policy/CMP0035.rst10
-rw-r--r--Help/policy/CMP0036.rst12
-rw-r--r--Help/policy/DISALLOWED_COMMAND.txt9
-rw-r--r--Modules/CMakeCInformation.cmake2
-rw-r--r--Modules/CMakeCXXInformation.cmake2
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake8
-rw-r--r--Modules/CMakeFortranInformation.cmake2
-rw-r--r--Modules/CheckTypeSize.cmake49
-rw-r--r--Modules/readme.txt192
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmBuildNameCommand.cxx3
-rw-r--r--Source/cmBuildNameCommand.h38
-rw-r--r--Source/cmCommand.h19
-rw-r--r--Source/cmExportLibraryDependencies.cxx4
-rw-r--r--Source/cmExportLibraryDependencies.h39
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx35
-rw-r--r--Source/cmLoadCommandCommand.cxx3
-rw-r--r--Source/cmLoadCommandCommand.h24
-rw-r--r--Source/cmOutputRequiredFilesCommand.cxx3
-rw-r--r--Source/cmOutputRequiredFilesCommand.h32
-rw-r--r--Source/cmPolicies.cxx40
-rw-r--r--Source/cmPolicies.h8
-rw-r--r--Source/cmRST.h10
-rw-r--r--Source/cmStandardIncludes.h28
-rw-r--r--Source/cmSubdirDependsCommand.cxx4
-rw-r--r--Source/cmSubdirDependsCommand.h34
-rw-r--r--Source/cmTarget.cxx27
-rw-r--r--Source/cmUseMangledMesaCommand.cxx4
-rw-r--r--Source/cmUseMangledMesaCommand.h39
-rw-r--r--Source/cmUtilitySourceCommand.cxx3
-rw-r--r--Source/cmUtilitySourceCommand.h39
-rw-r--r--Source/cmVariableRequiresCommand.cxx3
-rw-r--r--Source/cmVariableRequiresCommand.h31
-rw-r--r--Tests/Module/CheckTypeSize/CMakeLists.txt15
-rw-r--r--Tests/Module/CheckTypeSize/CheckTypeSize.cxx172
-rw-r--r--Tests/Module/CheckTypeSize/config.hxx.in23
-rw-r--r--Tests/Module/CheckTypeSize/someclass.hxx14
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt9
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage-result.txt1
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage-stderr.txt8
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage.cmake2
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs-result.txt1
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs-stderr.txt10
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs.cmake2
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeOk.cmake10
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-result.txt1
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt8
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake2
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage-result.txt1
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage-stderr.txt10
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage.cmake2
-rw-r--r--Tests/RunCMake/CheckModules/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0029-NEW-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0029-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0029-NEW.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0029-OLD-stderr.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0029-OLD.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0029-WARN-stderr.txt7
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0029-WARN.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-NEW-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-NEW.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-OLD-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-OLD-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-OLD.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-WARN-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0030-WARN.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-NEW-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-NEW.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-OLD-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-OLD-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-OLD.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-WARN-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0031-WARN.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-NEW-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-NEW.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-OLD-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-OLD-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-OLD.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-WARN-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0032-WARN.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-NEW-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-NEW.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-OLD-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-OLD-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-OLD.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-WARN-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0033-WARN.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-NEW-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-NEW.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-OLD-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-OLD-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-OLD.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-WARN-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0034-WARN.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-NEW-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-NEW.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-OLD-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-OLD-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-OLD.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-WARN-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0035-WARN.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-NEW-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-NEW.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-OLD-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-OLD-stderr.txt4
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-OLD.cmake2
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-WARN-result.txt1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMP0036-WARN.cmake1
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake16
-rw-r--r--Utilities/Sphinx/conf.py.in1
143 files changed, 1403 insertions, 491 deletions
diff --git a/Help/command/build_name.rst b/Help/command/build_name.rst
index 2148e49..53cd05e 100644
--- a/Help/command/build_name.rst
+++ b/Help/command/build_name.rst
@@ -1,7 +1,9 @@
build_name
----------
-Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.
+Disallowed. See CMake Policy :policy:`CMP0036`.
+
+Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.
::
diff --git a/Help/command/export_library_dependencies.rst b/Help/command/export_library_dependencies.rst
index c09f3d5..73c0b42 100644
--- a/Help/command/export_library_dependencies.rst
+++ b/Help/command/export_library_dependencies.rst
@@ -1,7 +1,9 @@
export_library_dependencies
---------------------------
-Deprecated. Use INSTALL(EXPORT) or EXPORT command.
+Disallowed. See CMake Policy :policy:`CMP0033`.
+
+Use :command:`install(EXPORT)` or :command:`export` command.
This command generates an old-style library dependencies file.
Projects requiring CMake 2.6 or later should not use the command. Use
diff --git a/Help/command/load_command.rst b/Help/command/load_command.rst
index 63f23be..fc316d4 100644
--- a/Help/command/load_command.rst
+++ b/Help/command/load_command.rst
@@ -1,6 +1,8 @@
load_command
------------
+Disallowed. See CMake Policy :policy:`CMP0031`.
+
Load a command into a running CMake.
::
diff --git a/Help/command/output_required_files.rst b/Help/command/output_required_files.rst
index d6bce13..5e13557 100644
--- a/Help/command/output_required_files.rst
+++ b/Help/command/output_required_files.rst
@@ -1,7 +1,9 @@
output_required_files
---------------------
-Deprecated. Approximate C preprocessor dependency scanning.
+Disallowed. See CMake Policy :policy:`CMP0032`.
+
+Approximate C preprocessor dependency scanning.
This command exists only because ancient CMake versions provided it.
CMake handles preprocessor dependency scanning automatically using a
diff --git a/Help/command/subdir_depends.rst b/Help/command/subdir_depends.rst
index c72a4af..5676c8f 100644
--- a/Help/command/subdir_depends.rst
+++ b/Help/command/subdir_depends.rst
@@ -1,7 +1,9 @@
subdir_depends
--------------
-Deprecated. Does nothing.
+Disallowed. See CMake Policy :policy:`CMP0029`.
+
+Does nothing.
::
diff --git a/Help/command/use_mangled_mesa.rst b/Help/command/use_mangled_mesa.rst
index a4d77e9..6f4d7ac 100644
--- a/Help/command/use_mangled_mesa.rst
+++ b/Help/command/use_mangled_mesa.rst
@@ -1,6 +1,8 @@
use_mangled_mesa
----------------
+Disallowed. See CMake Policy :policy:`CMP0030`.
+
Copy mesa headers for use in combination with system GL.
::
diff --git a/Help/command/utility_source.rst b/Help/command/utility_source.rst
index e513627..5122e52 100644
--- a/Help/command/utility_source.rst
+++ b/Help/command/utility_source.rst
@@ -1,6 +1,8 @@
utility_source
--------------
+Disallowed. See CMake Policy :policy:`CMP0034`.
+
Specify the source tree of a third-party utility.
::
diff --git a/Help/command/variable_requires.rst b/Help/command/variable_requires.rst
index 7535e40..831dd00 100644
--- a/Help/command/variable_requires.rst
+++ b/Help/command/variable_requires.rst
@@ -1,7 +1,9 @@
variable_requires
-----------------
-Deprecated. Use the if() command instead.
+Disallowed. See CMake Policy :policy:`CMP0035`.
+
+Use the if() command instead.
Assert satisfaction of an option's required variables.
diff --git a/Help/index.rst b/Help/index.rst
index 7db0be6..850660e 100644
--- a/Help/index.rst
+++ b/Help/index.rst
@@ -20,6 +20,7 @@ CMake Reference Documentation
/manual/cmake-properties.7
/manual/cmake-variables.7
/manual/cmake-generator-expressions.7
+ /manual/cmake-developer.7
.. only:: html
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
new file mode 100644
index 0000000..eace3a4
--- /dev/null
+++ b/Help/manual/cmake-developer.7.rst
@@ -0,0 +1,497 @@
+cmake-developer(7)
+******************
+
+.. only:: html or latex
+
+ .. contents::
+
+Introduction
+============
+
+This manual is intended for reference by developers modifying the CMake
+source tree itself.
+
+Help
+====
+
+The ``Help`` directory contains CMake help manual source files.
+They are written using the `reStructuredText`_ markup syntax and
+processed by `Sphinx`_ to generate the CMake help manuals.
+
+.. _`reStructuredText`: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
+.. _`Sphinx`: http://sphinx-doc.org
+
+Markup Constructs
+-----------------
+
+In addition to using Sphinx to generate the CMake help manuals, we
+also use a C++-implemented document processor to print documents for
+the ``--help-*`` command-line help options. It supports a subset of
+reStructuredText markup. When authoring or modifying documents,
+please verify that the command-line help looks good in addition to the
+Sphinx-generated html and man pages.
+
+The command-line help processor supports the following constructs
+defined by reStructuredText, Sphinx, and a CMake extension to Sphinx.
+
+..
+ Note: This list must be kept consistent with the cmRST implementation.
+
+CMake Domain directives
+ Directives defined in the `CMake Domain`_ for defining CMake
+ documentation objects are printed in command-line help output as
+ if the lines were normal paragraph text with interpretation.
+
+CMake Domain interpreted text roles
+ Interpreted text roles defined in the `CMake Domain`_ for
+ cross-referencing CMake documentation objects are replaced by their
+ link text in command-line help output. Other roles are printed
+ literally and not processed.
+
+``code-block`` directive
+ Add a literal code block without interpretation. The command-line
+ help processor prints the block content without the leading directive
+ line and with common indentation replaced by one space.
+
+``include`` directive
+ Include another document source file. The command-line help
+ processor prints the included document inline with the referencing
+ document.
+
+literal block after ``::``
+ A paragraph ending in ``::`` followed by a blank line treats
+ the following indented block as literal text without interpretation.
+ The command-line help processor prints the ``::`` literally and
+ prints the block content with common indentation replaced by one
+ space. We prefer the ``::`` to appear at the end of a paragraph
+ line instead of as its own line.
+
+``parsed-literal`` directive
+ Add a literal block with markup interpretation. The command-line
+ help processor prints the block content without the leading
+ directive line and with common indentation replaced by one space.
+
+``replace`` directive
+ Define a ``|substitution|`` replacement.
+ The command-line help processor requires a substitution replacement
+ to be defined before it is referenced.
+
+``|substitution|`` reference
+ Reference a substitution replacement previously defined by
+ the ``replace`` directive. The command-line help processor
+ performs the substitution and replaces all newlines in the
+ replacement text with spaces.
+
+``toctree`` directive
+ Include other document sources in the Table-of-Contents
+ document tree. The command-line help processor prints
+ the referenced documents inline as part of the referencing
+ document.
+
+Inline markup constructs not listed above are printed literally in the
+command-line help output. We prefer to use inline markup constructs that
+look correct in source form, so avoid use of \\-escapes in favor of inline
+literals when possible.
+
+Explicit markup blocks not matching directives listed above are removed from
+command-line help output. Do not use them, except for plain ``..`` comments
+that are removed by Sphinx too.
+
+Note that nested indentation of blocks is not recognized by the
+command-line help processor. Therefore:
+
+* Explicit markup blocks are recognized only when not indented
+ inside other blocks.
+
+* Literal blocks after paragraphs ending in ``::`` but not
+ at the top indentation level may consume all indented lines
+ following them.
+
+Try to avoid these cases in practice.
+
+CMake Domain
+------------
+
+CMake adds a `Sphinx Domain`_ called ``cmake``, also called the
+"CMake Domain". It defines several "object" types for CMake
+documentation:
+
+``command``
+ A CMake language command.
+
+``generator``
+ A CMake native build system generator.
+ See the :manual:`cmake(1)` command-line tool's ``-G`` option.
+
+``manual``
+ A CMake manual page, like this :manual:`cmake-developer(7)` manual.
+
+``module``
+ A CMake module.
+ See the :manual:`cmake-modules(7)` manual
+ and the :command:`include` command.
+
+``policy``
+ A CMake policy.
+ See the :manual:`cmake-policies(7)` manual
+ and the :command:`cmake_policy` command.
+
+``prop_cache, prop_dir, prop_gbl, prop_sf, prop_test, prop_tgt``
+ A CMake cache, directory, global, source file, test, or target
+ property, respectively. See the :manual:`cmake-properties(7)` manual
+ and the :command:`set_property` command.
+
+``variable``
+ A CMake language variable.
+ See the :manual:`cmake-variables(7)` manual
+ and the :command:`set` command.
+
+Documentation objects in the CMake Domain come from two sources.
+First, the CMake extension to Sphinx transforms every document named
+with the form ``Help/<type>/<file-name>.rst`` to a domain object with
+type ``<type>``. The object name is extracted from the document title,
+which is expected to be of the form::
+
+ <object-name>
+ -------------
+
+and to appear at or near the top of the ``.rst`` file before any other
+lines starting in a letter, digit, or ``<``. If no such title appears
+literally in the ``.rst`` file, the object name is the ``<file-name>``.
+If a title does appear, it is expected that ``<file-name>`` is equal
+to ``<object-name>`` with any ``<`` and ``>`` characters removed.
+
+Second, the CMake Domain provides directives to define objects inside
+other documents:
+
+.. code-block:: rst
+
+ .. command:: <command-name>
+
+ This indented block documents <command-name>.
+
+ .. variable:: <variable-name>
+
+ This indented block documents <variable-name>.
+
+Object types for which no directive is available must be defined using
+the first approach above.
+
+.. _`Sphinx Domain`: http://sphinx-doc.org/domains.html
+
+Cross-References
+----------------
+
+Sphinx uses reStructuredText interpreted text roles to provide
+cross-reference syntax. The `CMake Domain`_ provides for each
+domain object type a role of the same name to cross-reference it.
+CMake Domain roles are inline markup of the forms::
+
+ :type:`name`
+ :type:`text <name>`
+
+where ``type`` is the domain object type and ``name`` is the
+domain object name. In the first form the link text will be
+``name`` (or ``name()`` if the type is ``command``) and in
+the second form the link text will be the explicit ``text``.
+For example, the code:
+
+.. code-block:: rst
+
+ * The :command:`list` command.
+ * The :command:`list(APPEND)` sub-command.
+ * The :command:`list() command <list>`.
+ * The :command:`list(APPEND) sub-command <list>`.
+ * The :variable:`CMAKE_VERSION` variable.
+ * The :prop_tgt:`OUTPUT_NAME_<CONFIG>` target property.
+
+produces:
+
+* The :command:`list` command.
+* The :command:`list(APPEND)` sub-command.
+* The :command:`list() command <list>`.
+* The :command:`list(APPEND) sub-command <list>`.
+* The :variable:`CMAKE_VERSION` variable.
+* The :prop_tgt:`OUTPUT_NAME_<CONFIG>` target property.
+
+Note that CMake Domain roles differ from Sphinx and reStructuredText
+convention in that the form ``a<b>``, without a space preceding ``<``,
+is interpreted as a name instead of link text with an explicit target.
+This is necessary because we use ``<placeholders>`` frequently in
+object names like ``OUTPUT_NAME_<CONFIG>``. The form ``a <b>``,
+with a space preceding ``<``, is still interpreted as a link text
+with an explicit target.
+
+Modules
+=======
+
+The ``Modules`` directory contains CMake-language ``.cmake`` module files.
+
+Module Documentation
+--------------------
+
+To add a module to the CMake documentation, follow these steps:
+
+1. Add file ``Help/module/<module-name>.rst`` containing just the line::
+
+ .. cmake-module:: ../../Modules/<module-name>.cmake
+
+2. Modify ``Help/manual/cmake-modules.7.rst`` to reference the module in the
+ toctree directive as::
+
+ /module/<module-name>
+
+ Keep the toctree in sorted order!
+
+3. Add to the top of ``Modules/<module-name>.cmake`` a #-comment of the form::
+
+ #.rst:
+ # <module-name>
+ # -------------
+ #
+ # ...reStructuredText documentation of module...
+
+ Comment blocks starting with the line ``#.rst:`` may appear anywhere
+ in the file. The ``cmake-module`` directive used above will scan the
+ file to extract reStructuredText markup from such comments.
+
+For example, a ``Modules/Findxxx.cmake`` module may contain:
+
+.. code-block:: cmake
+
+ #.rst:
+ # FindXxx
+ # -------
+ #
+ # This is a cool module.
+ # This module does really cool stuff.
+ # It can do even more than you think.
+ #
+ # It even needs two paragraphs to tell you about it.
+ # And it defines the following variables:
+ #
+ # * VAR_COOL: this is great isn't it?
+ # * VAR_REALLY_COOL: cool right?
+
+ <code>
+
+ #.rst:
+ # .. command:: xxx_do_something
+ #
+ # This command does something for Xxx::
+ #
+ # xxx_do_something(some arguments)
+ macro(xxx_do_something)
+ <code>
+ endmacro()
+
+Find Modules
+------------
+
+A "find module" is a ``Modules/Find<package>.cmake`` file to be loaded
+by the :command:`find_package` command when invoked for ``<package>``.
+
+We would like all ``FindXxx.cmake`` files to produce consistent variable
+names. Please use the following consistent variable names for general use.
+
+Xxx_INCLUDE_DIRS
+ The final set of include directories listed in one variable for use by client
+ code. This should not be a cache entry.
+
+Xxx_LIBRARIES
+ The libraries to link against to use Xxx. These should include full paths.
+ This should not be a cache entry.
+
+Xxx_DEFINITIONS
+ Definitions to use when compiling code that uses Xxx. This really shouldn't
+ include options such as (-DHAS_JPEG)that a client source-code file uses to
+ decide whether to #include <jpeg.h>
+
+Xxx_EXECUTABLE
+ Where to find the Xxx tool.
+
+Xxx_Yyy_EXECUTABLE
+ Where to find the Yyy tool that comes with Xxx.
+
+Xxx_LIBRARY_DIRS
+ Optionally, the final set of library directories listed in one variable for
+ use by client code. This should not be a cache entry.
+
+Xxx_ROOT_DIR
+ Where to find the base directory of Xxx.
+
+Xxx_VERSION_Yy
+ Expect Version Yy if true. Make sure at most one of these is ever true.
+
+Xxx_WRAP_Yy
+ If False, do not try to use the relevant CMake wrapping command.
+
+Xxx_Yy_FOUND
+ If False, optional Yy part of Xxx sytem is not available.
+
+Xxx_FOUND
+ Set to false, or undefined, if we haven't found, or don't want to use Xxx.
+
+Xxx_NOT_FOUND_MESSAGE
+ Should be set by config-files in the case that it has set Xxx_FOUND to FALSE.
+ The contained message will be printed by the find_package() command and by
+ find_package_handle_standard_args() to inform the user about the problem.
+
+Xxx_RUNTIME_LIBRARY_DIRS
+ Optionally, the runtime library search path for use when running an
+ executable linked to shared libraries. The list should be used by user code
+ to create the PATH on windows or LD_LIBRARY_PATH on unix. This should not be
+ a cache entry.
+
+Xxx_VERSION_STRING
+ A human-readable string containing the version of the package found, if any.
+
+Xxx_VERSION_MAJOR
+ The major version of the package found, if any.
+
+Xxx_VERSION_MINOR
+ The minor version of the package found, if any.
+
+Xxx_VERSION_PATCH
+ The patch version of the package found, if any.
+
+You do not have to provide all of the above variables. You should provide
+Xxx_FOUND under most circumstances. If Xxx is a library, then Xxx_LIBRARIES,
+should also be defined, and Xxx_INCLUDE_DIRS should usually be defined (I
+guess libm.a might be an exception)
+
+The following names should not usually be used in CMakeLists.txt files, but
+they may be usefully modified in users' CMake Caches to control stuff.
+
+Xxx_LIBRARY
+ Name of Xxx Library. A User may set this and Xxx_INCLUDE_DIR to ignore to
+ force non-use of Xxx.
+
+Xxx_Yy_LIBRARY
+ Name of Yy library that is part of the Xxx system. It may or may not be
+ required to use Xxx.
+
+Xxx_INCLUDE_DIR
+ Where to find xxx.h, etc. (Xxx_INCLUDE_PATH was considered bad because a path
+ includes an actual filename.)
+
+Xxx_Yy_INCLUDE_DIR
+ Where to find xxx_yy.h, etc.
+
+For tidiness's sake, try to keep as many options as possible out of the cache,
+leaving at least one option which can be used to disable use of the module, or
+locate a not-found library (e.g. Xxx_ROOT_DIR). For the same reason, mark
+most cache options as advanced.
+
+If you need other commands to do special things then it should still begin
+with ``Xxx_``. This gives a sort of namespace effect and keeps things tidy for the
+user. You should put comments describing all the exported settings, plus
+descriptions of any the users can use to control stuff.
+
+You really should also provide backwards compatibility any old settings that
+were actually in use. Make sure you comment them as deprecated, so that
+no-one starts using them.
+
+To add a module to the CMake documentation, follow the steps in the
+`Module Documentation`_ section above. Test the documentation formatting
+by running ``cmake --help-module FindXxx``, and also by enabling the
+``SPHINX_HTML`` and ``SPHINX_MAN`` options to build the documentation.
+Edit the comments until generated documentation looks satisfactory.
+To have a .cmake file in this directory NOT show up in the modules
+documentation, simply leave out the ``Help/module/<module-name>.rst`` file
+and the ``Help/manual/cmake-modules.7.rst`` toctree entry.
+
+After the documentation, leave a *BLANK* line, and then add a
+copyright and licence notice block like this one::
+
+ #=============================================================================
+ # Copyright 2009-2011 Your Name
+ #
+ # Distributed under the OSI-approved BSD License (the "License");
+ # see accompanying file Copyright.txt for details.
+ #
+ # This software is distributed WITHOUT ANY WARRANTY; without even the
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ # See the License for more information.
+ #=============================================================================
+ # (To distribute this file outside of CMake, substitute the full
+ # License text for the above reference.)
+
+The layout of the notice block is strictly enforced by the ``ModuleNotices``
+test. Only the year range and name may be changed freely.
+
+A FindXxx.cmake module will typically be loaded by the command::
+
+ FIND_PACKAGE(Xxx [major[.minor[.patch[.tweak]]]] [EXACT]
+ [QUIET] [[REQUIRED|COMPONENTS] [components...]])
+
+If any version numbers are given to the command it will set the following
+variables before loading the module:
+
+Xxx_FIND_VERSION
+ full requested version string
+
+Xxx_FIND_VERSION_MAJOR
+ major version if requested, else 0
+
+Xxx_FIND_VERSION_MINOR
+ minor version if requested, else 0
+
+Xxx_FIND_VERSION_PATCH
+ patch version if requested, else 0
+
+Xxx_FIND_VERSION_TWEAK
+ tweak version if requested, else 0
+
+Xxx_FIND_VERSION_COUNT
+ number of version components, 0 to 4
+
+Xxx_FIND_VERSION_EXACT
+ true if EXACT option was given
+
+If the find module supports versioning it should locate a version of
+the package that is compatible with the version requested. If a
+compatible version of the package cannot be found the module should
+not report success. The version of the package found should be stored
+in "Xxx_VERSION..." version variables documented by the module.
+
+If the QUIET option is given to the command it will set the variable
+Xxx_FIND_QUIETLY to true before loading the FindXxx.cmake module. If
+this variable is set the module should not complain about not being
+able to find the package. If the
+REQUIRED option is given to the command it will set the variable
+Xxx_FIND_REQUIRED to true before loading the FindXxx.cmake module. If
+this variable is set the module should issue a FATAL_ERROR if the
+package cannot be found.
+If neither the QUIET nor REQUIRED options are given then the
+FindXxx.cmake module should look for the package and complain without
+error if the module is not found.
+
+FIND_PACKAGE() will set the variable CMAKE_FIND_PACKAGE_NAME to
+contain the actual name of the package.
+
+A package can provide sub-components.
+Those components can be listed after the COMPONENTS (or REQUIRED) or
+OPTIONAL_COMPONENTS keywords. The set of all listed components will be
+specified in a Xxx_FIND_COMPONENTS variable.
+For each package-specific component, say Yyy, a variable Xxx_FIND_REQUIRED_Yyy
+will be set to true if it listed after COMPONENTS and it will be set to false
+if it was listed after OPTIONAL_COMPONENTS.
+Using those variables a FindXxx.cmake module and also a XxxConfig.cmake
+package configuration file can determine whether and which components have
+been requested, and whether they were requested as required or as optional.
+For each of the requested components a Xxx_Yyy_FOUND variable should be set
+accordingly.
+The per-package Xxx_FOUND variable should be only set to true if all requested
+required components have been found. A missing optional component should not
+keep the Xxx_FOUND variable from being set to true.
+If the package provides Xxx_INCLUDE_DIRS and Xxx_LIBRARIES variables, the
+include dirs and libraries for all components which were requested and which
+have been found should be added to those two variables.
+
+To get this behaviour you can use the FIND_PACKAGE_HANDLE_STANDARD_ARGS()
+macro, as an example see FindJPEG.cmake.
+
+For internal implementation, it's a generally accepted convention that
+variables starting with underscore are for temporary use only. (variable
+starting with an underscore are not intended as a reserved prefix).
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index cb328ee..fcbccba 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -58,3 +58,11 @@ All Policies
/policy/CMP0026
/policy/CMP0027
/policy/CMP0028
+ /policy/CMP0029
+ /policy/CMP0030
+ /policy/CMP0031
+ /policy/CMP0032
+ /policy/CMP0033
+ /policy/CMP0034
+ /policy/CMP0035
+ /policy/CMP0036
diff --git a/Help/policy/CMP0029.rst b/Help/policy/CMP0029.rst
new file mode 100644
index 0000000..92ef1ec
--- /dev/null
+++ b/Help/policy/CMP0029.rst
@@ -0,0 +1,10 @@
+CMP0029
+-------
+
+The :command:`subdir_depends` command should not be called.
+
+The implementation of this command has been empty since December 2001
+but was kept in CMake for compatibility for a long time.
+
+.. |disallowed_version| replace:: 3.0.0
+.. include:: DISALLOWED_COMMAND.txt
diff --git a/Help/policy/CMP0030.rst b/Help/policy/CMP0030.rst
new file mode 100644
index 0000000..6fcffc3
--- /dev/null
+++ b/Help/policy/CMP0030.rst
@@ -0,0 +1,11 @@
+CMP0030
+-------
+
+The :command:`use_mangled_mesa` command should not be called.
+
+This command was created in September 2001 to support VTK before
+modern CMake language and custom command capabilities. VTK has
+not used it in years.
+
+.. |disallowed_version| replace:: 3.0.0
+.. include:: DISALLOWED_COMMAND.txt
diff --git a/Help/policy/CMP0031.rst b/Help/policy/CMP0031.rst
new file mode 100644
index 0000000..e97dd0a
--- /dev/null
+++ b/Help/policy/CMP0031.rst
@@ -0,0 +1,13 @@
+CMP0031
+-------
+
+The :command:`load_command` command should not be called.
+
+This command was added in August 2002 to allow projects to add
+arbitrary commands implemented in C or C++. However, it does
+not work when the toolchain in use does not match the ABI of
+the CMake process. It has been mostly superseded by the
+:command:`macro` and :command:`function` commands.
+
+.. |disallowed_version| replace:: 3.0.0
+.. include:: DISALLOWED_COMMAND.txt
diff --git a/Help/policy/CMP0032.rst b/Help/policy/CMP0032.rst
new file mode 100644
index 0000000..1b6be48
--- /dev/null
+++ b/Help/policy/CMP0032.rst
@@ -0,0 +1,13 @@
+CMP0032
+-------
+
+The :command:`output_required_files` command should not be called.
+
+This command was added in June 2001 to expose the then-current CMake
+implicit dependency scanner. CMake's real implicit dependency scanner
+has evolved since then but is not exposed through this command. The
+scanning capabilities of this command are very limited and this
+functionality is better achieved through dedicated outside tools.
+
+.. |disallowed_version| replace:: 3.0.0
+.. include:: DISALLOWED_COMMAND.txt
diff --git a/Help/policy/CMP0033.rst b/Help/policy/CMP0033.rst
new file mode 100644
index 0000000..677e1c4
--- /dev/null
+++ b/Help/policy/CMP0033.rst
@@ -0,0 +1,14 @@
+CMP0033
+-------
+
+The :command:`export_library_dependencies` command should not be called.
+
+This command was added in January 2003 to export ``<tgt>_LIB_DEPENDS``
+internal CMake cache entries to a file for installation with a project.
+This was used at the time to allow transitive link dependencies to
+work for applications outside of the original build tree of a project.
+The functionality has been superseded by the :command:`export` and
+:command:`install(EXPORT)` commands.
+
+.. |disallowed_version| replace:: 3.0.0
+.. include:: DISALLOWED_COMMAND.txt
diff --git a/Help/policy/CMP0034.rst b/Help/policy/CMP0034.rst
new file mode 100644
index 0000000..1dd6e5c
--- /dev/null
+++ b/Help/policy/CMP0034.rst
@@ -0,0 +1,11 @@
+CMP0034
+-------
+
+The :command:`utility_source` command should not be called.
+
+This command was introduced in March 2001 to help build executables used to
+generate other files. This approach has long been replaced by
+:command:`add_executable` combined with :command:`add_custom_command`.
+
+.. |disallowed_version| replace:: 3.0.0
+.. include:: DISALLOWED_COMMAND.txt
diff --git a/Help/policy/CMP0035.rst b/Help/policy/CMP0035.rst
new file mode 100644
index 0000000..ebdaccc
--- /dev/null
+++ b/Help/policy/CMP0035.rst
@@ -0,0 +1,10 @@
+CMP0035
+-------
+
+The :command:`variable_requires` command should not be called.
+
+This command was introduced in November 2001 to perform some conditional
+logic. It has long been replaced by the :command:`if` command.
+
+.. |disallowed_version| replace:: 3.0.0
+.. include:: DISALLOWED_COMMAND.txt
diff --git a/Help/policy/CMP0036.rst b/Help/policy/CMP0036.rst
new file mode 100644
index 0000000..9a5a0fd
--- /dev/null
+++ b/Help/policy/CMP0036.rst
@@ -0,0 +1,12 @@
+CMP0036
+-------
+
+The :command:`build_name` command should not be called.
+
+This command was added in May 2001 to compute a name for the current
+operating system and compiler combination. The command has long been
+documented as discouraged and replaced by the :variable:`CMAKE_SYSTEM`
+and :variable:`CMAKE_<LANG>_COMPILER` variables.
+
+.. |disallowed_version| replace:: 3.0.0
+.. include:: DISALLOWED_COMMAND.txt
diff --git a/Help/policy/DISALLOWED_COMMAND.txt b/Help/policy/DISALLOWED_COMMAND.txt
new file mode 100644
index 0000000..36280d2
--- /dev/null
+++ b/Help/policy/DISALLOWED_COMMAND.txt
@@ -0,0 +1,9 @@
+CMake >= |disallowed_version| prefer that this command never be called.
+The OLD behavior for this policy is to allow the command to be called.
+The NEW behavior for this policy is to issue a FATAL_ERROR when the
+command is called.
+
+This policy was introduced in CMake version |disallowed_version|.
+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/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index ce5ce44..0f5b694 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -34,7 +34,7 @@ if(CMAKE_C_COMPILER_ID)
endif()
set(CMAKE_BASE_NAME)
-get_filename_component(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
+get_filename_component(CMAKE_BASE_NAME "${CMAKE_C_COMPILER}" NAME_WE)
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_BASE_NAME gcc)
endif()
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 933c15a..45ec95a 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -34,7 +34,7 @@ if(CMAKE_CXX_COMPILER_ID)
endif()
set(CMAKE_BASE_NAME)
-get_filename_component(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
+get_filename_component(CMAKE_BASE_NAME "${CMAKE_CXX_COMPILER}" NAME_WE)
# since the gnu compiler has several names force g++
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_BASE_NAME g++)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 0d7aa61..6fccb16 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -44,7 +44,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
endforeach()
# If the compiler is still unknown, try to query its vendor.
- if(NOT CMAKE_${lang}_COMPILER_ID)
+ if(CMAKE_${lang}_COMPILER AND NOT CMAKE_${lang}_COMPILER_ID)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang})
endif()
@@ -232,7 +232,7 @@ Id flags: ${testflags}
else()
if(COMMAND EXECUTE_PROCESS)
execute_process(
- COMMAND ${CMAKE_${lang}_COMPILER}
+ COMMAND "${CMAKE_${lang}_COMPILER}"
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
@@ -244,7 +244,7 @@ Id flags: ${testflags}
)
else()
exec_program(
- ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
+ "${CMAKE_${lang}_COMPILER}" ${CMAKE_${lang}_COMPILER_ID_DIR}
ARGS ${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
@@ -476,7 +476,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
set(flags ${CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor}})
set(regex ${CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor}})
execute_process(
- COMMAND ${CMAKE_${lang}_COMPILER}
+ COMMAND "${CMAKE_${lang}_COMPILER}"
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${flags}
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 512ec48..debfd46 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -24,7 +24,7 @@ if(CMAKE_Fortran_COMPILER_ID)
endif()
set(CMAKE_BASE_NAME)
-get_filename_component(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
+get_filename_component(CMAKE_BASE_NAME "${CMAKE_Fortran_COMPILER}" NAME_WE)
# since the gnu compiler has several names force g++
if(CMAKE_COMPILER_IS_GNUG77)
set(CMAKE_BASE_NAME g77)
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index 0798176..a9efae4 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -6,7 +6,8 @@
#
# ::
#
-# CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY])
+# CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY]
+# [LANGUAGE <language>])
#
# Check if the type exists and determine its size. On return,
# "HAVE_${VARIABLE}" holds the existence of the type, and "${VARIABLE}"
@@ -36,6 +37,9 @@
# check automatically includes the available headers, thus supporting
# checks of types defined in the headers.
#
+# If LANGUAGE is set, the specified compiler will be used to perform the
+# check. Acceptable values are C and CXX
+#
# Despite the name of the macro you may use it to check the size of more
# complex expressions, too. To check e.g. for the size of a struct
# member you can do something like this:
@@ -79,7 +83,7 @@ get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
#-----------------------------------------------------------------------------
# Helper function. DO NOT CALL DIRECTLY.
-function(__check_type_size_impl type var map builtin)
+function(__check_type_size_impl type var map builtin language)
message(STATUS "Check size of ${type}")
# Include header files.
@@ -101,8 +105,13 @@ function(__check_type_size_impl type var map builtin)
# Perform the check.
-
- set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
+ if("${language}" STREQUAL "C")
+ set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
+ elseif("${language}" STREQUAL "CXX")
+ set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.cpp)
+ else()
+ message(FATAL_ERROR "Unknown language:\n ${language}\nSupported languages: C, CXX.\n")
+ endif()
set(bin ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.bin)
configure_file(${__check_type_size_dir}/CheckTypeSize.c.in ${src} @ONLY)
try_compile(HAVE_${var} ${CMAKE_BINARY_DIR} ${src}
@@ -176,8 +185,36 @@ endfunction()
#-----------------------------------------------------------------------------
macro(CHECK_TYPE_SIZE TYPE VARIABLE)
+ # parse arguments
+ unset(doing)
+ foreach(arg ${ARGN})
+ if("x${arg}" STREQUAL "xBUILTIN_TYPES_ONLY")
+ set(_CHECK_TYPE_SIZE_${arg} 1)
+ unset(doing)
+ elseif("x${arg}" STREQUAL "xLANGUAGE") # change to MATCHES for more keys
+ set(doing "${arg}")
+ set(_CHECK_TYPE_SIZE_${doing} "")
+ elseif("x${doing}" STREQUAL "xLANGUAGE")
+ set(_CHECK_TYPE_SIZE_${doing} "${arg}")
+ unset(doing)
+ else()
+ message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
+ endif()
+ endforeach()
+ if("x${doing}" MATCHES "^x(LANGUAGE)$")
+ message(FATAL_ERROR "Missing argument:\n ${doing} arguments requires a value\n")
+ endif()
+ if(DEFINED _CHECK_TYPE_SIZE_LANGUAGE)
+ if(NOT "x${_CHECK_TYPE_SIZE_LANGUAGE}" MATCHES "^x(C|CXX)$")
+ message(FATAL_ERROR "Unknown language:\n ${_CHECK_TYPE_SIZE_LANGUAGE}.\nSupported languages: C, CXX.\n")
+ endif()
+ set(_language ${_CHECK_TYPE_SIZE_LANGUAGE})
+ else()
+ set(_language C)
+ endif()
+
# Optionally check for standard headers.
- if("${ARGV2}" STREQUAL "BUILTIN_TYPES_ONLY")
+ if(_CHECK_TYPE_SIZE_BUILTIN_TYPES_ONLY)
set(_builtin 0)
else()
set(_builtin 1)
@@ -190,7 +227,7 @@ macro(CHECK_TYPE_SIZE TYPE VARIABLE)
set(${VARIABLE}_KEYS)
set(_map_file ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${VARIABLE}.cmake)
if(NOT DEFINED HAVE_${VARIABLE})
- __check_type_size_impl(${TYPE} ${VARIABLE} ${_map_file} ${_builtin})
+ __check_type_size_impl(${TYPE} ${VARIABLE} ${_map_file} ${_builtin} ${_language})
endif()
include(${_map_file} OPTIONAL)
set(_map_file)
diff --git a/Modules/readme.txt b/Modules/readme.txt
index 2593b4f..b40f3d0 100644
--- a/Modules/readme.txt
+++ b/Modules/readme.txt
@@ -1,190 +1,4 @@
-For more information about how to contribute modules to CMake, see this page:
-http://www.itk.org/Wiki/CMake:Module_Maintainers
-
-Note to authors of FindXxx.cmake files
-
-We would like all FindXxx.cmake files to produce consistent variable names.
-
-Please use the following consistent variable names for general use.
-
-Xxx_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code.
- This should not be a cache entry.
-Xxx_LIBRARIES The libraries to link against to use Xxx. These should include full paths.
- This should not be a cache entry.
-Xxx_DEFINITIONS Definitions to use when compiling code that uses Xxx. This really shouldn't include options such
- as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include <jpeg.h>
-Xxx_EXECUTABLE Where to find the Xxx tool.
-Xxx_Yyy_EXECUTABLE Where to find the Yyy tool that comes with Xxx.
-Xxx_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code.
- This should not be a cache entry.
-Xxx_ROOT_DIR Where to find the base directory of Xxx.
-Xxx_VERSION_Yy Expect Version Yy if true. Make sure at most one of these is ever true.
-Xxx_WRAP_Yy If False, do not try to use the relevant CMake wrapping command.
-Xxx_Yy_FOUND If False, optional Yy part of Xxx sytem is not available.
-Xxx_FOUND Set to false, or undefined, if we haven't found, or don't want to use Xxx.
-Xxx_NOT_FOUND_MESSAGE Should be set by config-files in the case that it has set Xxx_FOUND to FALSE.
- The contained message will be printed by the find_package() command and by
- find_package_handle_standard_args() to inform the user about the problem.
-Xxx_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to
- shared libraries.
- The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix.
- This should not be a cache entry.
-Xxx_VERSION_STRING A human-readable string containing the version of the package found, if any.
-Xxx_VERSION_MAJOR The major version of the package found, if any.
-Xxx_VERSION_MINOR The minor version of the package found, if any.
-Xxx_VERSION_PATCH The patch version of the package found, if any.
-
-You do not have to provide all of the above variables. You should provide Xxx_FOUND under most circumstances.
-If Xxx is a library, then Xxx_LIBRARIES, should also be defined, and Xxx_INCLUDE_DIRS should usually be
-defined (I guess libm.a might be an exception)
-
-The following names should not usually be used in CMakeLists.txt files, but they may be usefully modified in
-users' CMake Caches to control stuff.
-
-Xxx_LIBRARY Name of Xxx Library. A User may set this and Xxx_INCLUDE_DIR to ignore to force non-use of Xxx.
-Xxx_Yy_LIBRARY Name of Yy library that is part of the Xxx system. It may or may not be required to use Xxx.
-Xxx_INCLUDE_DIR Where to find xxx.h, etc. (Xxx_INCLUDE_PATH was considered bad because a path includes an
- actual filename.)
-Xxx_Yy_INCLUDE_DIR Where to find xxx_yy.h, etc.
-
-For tidiness's sake, try to keep as many options as possible out of the cache, leaving at least one option which can be
-used to disable use of the module, or locate a not-found library (e.g. Xxx_ROOT_DIR).
-For the same reason, mark most cache options as advanced.
-
-If you need other commands to do special things then it should still begin with Xxx_. This gives a sort of namespace
-effect and keeps things tidy for the user. You should put comments describing all the exported settings, plus
-descriptions of any the users can use to control stuff.
-
-You really should also provide backwards compatibility any old settings that were actually in use.
-Make sure you comment them as deprecated, so that no-one starts using them.
-
-To add a module to the CMake documentation, follow these steps:
-
-1. Add file ``Help/module/FindXxx.rst`` containing just the line::
-
- .. cmake-module:: ../../Modules/FindXxx.cmake
-
-2. Modify ``Help/manual/cmake-modules.7.rst`` to reference the module in the
- toctree directive as::
-
- /module/FindXxx
-
- Keep the toctree in sorted order!
-
-3. Add to the top of ``Modules/FindXxx.cmake`` a #-comment of the form::
-
- #.rst:
- # FindXxx
- # -------
- #
- # ...reStructuredText documentation of module...
+See the "Find Modules" section of the cmake-developer(7) manual page.
- Comment blocks starting with the line ``#.rst:`` may appear anywhere
- in the file.
-
-For example::
-
- #.rst
- # FindXxx
- # -------
- #
- # This is a cool module.
- # This module does really cool stuff.
- # It can do even more than you think.
- #
- # It even needs two paragraphs to tell you about it.
- # And it defines the following variables:
- #
- # * VAR_COOL: this is great isn't it?
- # * VAR_REALLY_COOL: cool right?
-
-Test the documentation formatting by running "cmake --help-module FindXxx",
-and ideally by enabling the SPHINX_HTML and SPHINX_MAN options to build the
-documentation. Edit the comments until generated documentation looks
-satisfactory.
-
-To have a .cmake file in this directory NOT show up in the modules
-documentation, simply leave out the ``Help/module/<module>.rst`` file and the
-``Help/manual/cmake-modules.7.rst`` toctree entry.
-
-After the documentation, leave a *BLANK* line, and then add a
-copyright and licence notice block like this one:
-
-#=============================================================================
-# Copyright 2009-2011 Your Name
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-The layout of the notice block is strictly enforced by the ModuleNotices test.
-Only the year range and name may be changed freely.
-
-A FindXxx.cmake module will typically be loaded by the command
-
- FIND_PACKAGE(Xxx [major[.minor[.patch[.tweak]]]] [EXACT]
- [QUIET] [[REQUIRED|COMPONENTS] [components...]])
-
-If any version numbers are given to the command it will set the
-following variables before loading the module:
-
- Xxx_FIND_VERSION = full requested version string
- Xxx_FIND_VERSION_MAJOR = major version if requested, else 0
- Xxx_FIND_VERSION_MINOR = minor version if requested, else 0
- Xxx_FIND_VERSION_PATCH = patch version if requested, else 0
- Xxx_FIND_VERSION_TWEAK = tweak version if requested, else 0
- Xxx_FIND_VERSION_COUNT = number of version components, 0 to 4
- Xxx_FIND_VERSION_EXACT = true if EXACT option was given
-
-If the find module supports versioning it should locate a version of
-the package that is compatible with the version requested. If a
-compatible version of the package cannot be found the module should
-not report success. The version of the package found should be stored
-in "Xxx_VERSION..." version variables documented by the module.
-
-If the QUIET option is given to the command it will set the variable
-Xxx_FIND_QUIETLY to true before loading the FindXxx.cmake module. If
-this variable is set the module should not complain about not being
-able to find the package. If the
-REQUIRED option is given to the command it will set the variable
-Xxx_FIND_REQUIRED to true before loading the FindXxx.cmake module. If
-this variable is set the module should issue a FATAL_ERROR if the
-package cannot be found.
-If neither the QUIET nor REQUIRED options are given then the
-FindXxx.cmake module should look for the package and complain without
-error if the module is not found.
-
-FIND_PACKAGE() will set the variable CMAKE_FIND_PACKAGE_NAME to
-contain the actual name of the package.
-
-A package can provide sub-components.
-Those components can be listed after the COMPONENTS (or REQUIRED)
-or OPTIONAL_COMPONENTS keywords. The set of all listed components will be
-specified in a Xxx_FIND_COMPONENTS variable.
-For each package-specific component, say Yyy, a variable Xxx_FIND_REQUIRED_Yyy
-will be set to true if it listed after COMPONENTS and it will be set to false
-if it was listed after OPTIONAL_COMPONENTS.
-Using those variables a FindXxx.cmake module and also a XxxConfig.cmake package
-configuration file can determine whether and which components have been requested,
-and whether they were requested as required or as optional.
-For each of the requested components a Xxx_Yyy_FOUND variable should be set
-accordingly.
-The per-package Xxx_FOUND variable should be only set to true if all requested
-required components have been found. A missing optional component should not
-keep the Xxx_FOUND variable from being set to true.
-If the package provides Xxx_INCLUDE_DIRS and Xxx_LIBRARIES variables, the include
-dirs and libraries for all components which were requested and which have been
-found should be added to those two variables.
-
-To get this behaviour you can use the FIND_PACKAGE_HANDLE_STANDARD_ARGS()
-macro, as an example see FindJPEG.cmake.
-
-For internal implementation, it's a generally accepted convention that variables starting with
-underscore are for temporary use only. (variable starting with an underscore
-are not intended as a reserved prefix).
+For more information about how to contribute modules to CMake, see this page:
+http://www.cmake.org/Wiki/CMake:Module_Maintainers
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 321066d..1c41593 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 20131022)
+set(CMake_VERSION_TWEAK 20131023)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx
index f95a79e..e3528e1 100644
--- a/Source/cmBuildNameCommand.cxx
+++ b/Source/cmBuildNameCommand.cxx
@@ -17,6 +17,9 @@
bool cmBuildNameCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
+ if(this->Disallowed(cmPolicies::CMP0036,
+ "The build_name command should not be called; see CMP0036."))
+ { return true; }
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h
index faeb3c0..2f7acde 100644
--- a/Source/cmBuildNameCommand.h
+++ b/Source/cmBuildNameCommand.h
@@ -14,46 +14,16 @@
#include "cmCommand.h"
-/** \class cmBuildNameCommand
- * \brief build_name command
- *
- * cmBuildNameCommand implements the build_name CMake command
- */
class cmBuildNameCommand : public cmCommand
{
public:
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmBuildNameCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
+ cmTypeMacro(cmBuildNameCommand, cmCommand);
+ virtual cmCommand* Clone() { return new cmBuildNameCommand; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
- /**
- * This determines if the command is invoked when in script mode.
- */
- virtual bool IsScriptable() const { return true; }
-
- /**
- * The name of the command as specified in CMakeList.txt.
- */
virtual const char* GetName() const {return "build_name";}
-
- /** This command is kept for compatibility with older CMake versions. */
- virtual bool IsDiscouraged() const
- {
- return true;
- }
-
- cmTypeMacro(cmBuildNameCommand, cmCommand);
+ virtual bool IsScriptable() const { return true; }
+ virtual bool IsDiscouraged() const { return true; }
};
diff --git a/Source/cmCommand.h b/Source/cmCommand.h
index 83184a0..e148857 100644
--- a/Source/cmCommand.h
+++ b/Source/cmCommand.h
@@ -173,6 +173,25 @@ public:
this->Error += e;
}
+ /** Check if the command is disallowed by a policy. */
+ bool Disallowed(cmPolicies::PolicyID pol, const char* e)
+ {
+ switch(this->Makefile->GetPolicyStatus(pol))
+ {
+ case cmPolicies::WARN:
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
+ this->Makefile->GetPolicies()->GetPolicyWarning(pol));
+ case cmPolicies::OLD:
+ return false;
+ case cmPolicies::REQUIRED_IF_USED:
+ case cmPolicies::REQUIRED_ALWAYS:
+ case cmPolicies::NEW:
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
+ break;
+ }
+ return true;
+ }
+
protected:
cmMakefile* Makefile;
cmCommandArgumentsHelper Helper;
diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx
index e3b1626..064ffa3 100644
--- a/Source/cmExportLibraryDependencies.cxx
+++ b/Source/cmExportLibraryDependencies.cxx
@@ -21,6 +21,10 @@
bool cmExportLibraryDependenciesCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
+ if(this->Disallowed(cmPolicies::CMP0033,
+ "The export_library_dependencies command should not be called; "
+ "see CMP0033."))
+ { return true; }
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
diff --git a/Source/cmExportLibraryDependencies.h b/Source/cmExportLibraryDependencies.h
index a384a7c..29b568f 100644
--- a/Source/cmExportLibraryDependencies.h
+++ b/Source/cmExportLibraryDependencies.h
@@ -14,50 +14,19 @@
#include "cmCommand.h"
-/** \class cmExportLibraryDependenciesCommand
- * \brief Add a test to the lists of tests to run.
- *
- * cmExportLibraryDependenciesCommand adds a test to the list of tests to run
- *
- */
class cmExportLibraryDependenciesCommand : public cmCommand
{
public:
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmExportLibraryDependenciesCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
+ cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand);
+ virtual cmCommand* Clone() { return new cmExportLibraryDependenciesCommand; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
+ virtual const char* GetName() const { return "export_library_dependencies";}
+ virtual bool IsDiscouraged() const { return true; }
- /**
- * This is called at the end after all the information
- * specified by the command is accumulated.
- */
virtual void FinalPass();
virtual bool HasFinalPass() const { return true; }
- /**
- * The name of the command as specified in CMakeList.txt.
- */
- virtual const char* GetName() const { return "export_library_dependencies";}
-
- /** This command is kept for compatibility with older CMake versions. */
- virtual bool IsDiscouraged() const
- {
- return true;
- }
-
- cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand);
-
private:
std::string Filename;
bool Append;
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index dfd995e..33863f4 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -704,17 +704,6 @@ std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
}
//----------------------------------------------------------------------------
-struct TransitiveWhitelistCompare
-{
- explicit TransitiveWhitelistCompare(const std::string &needle)
- : Needle(needle) {}
- bool operator() (const char *item)
- { return strcmp(item, this->Needle.c_str()) == 0; }
-private:
- std::string Needle;
-};
-
-//----------------------------------------------------------------------------
static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
TargetPropertyNode() {}
@@ -864,8 +853,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
return std::string();
case cmGeneratorExpressionDAGChecker::ALREADY_SEEN:
for (size_t i = 1;
- i < (sizeof(targetPropertyTransitiveWhitelist) /
- sizeof(*targetPropertyTransitiveWhitelist));
+ i < cmArraySize(targetPropertyTransitiveWhitelist);
++i)
{
if (targetPropertyTransitiveWhitelist[i] == propertyName)
@@ -928,12 +916,13 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
cmTarget *headTarget = context->HeadTarget ? context->HeadTarget : target;
- const char **transBegin = targetPropertyTransitiveWhitelist + 1;
- const char **transEnd = targetPropertyTransitiveWhitelist
- + (sizeof(targetPropertyTransitiveWhitelist) /
- sizeof(*targetPropertyTransitiveWhitelist));
+ const char * const *transBegin =
+ cmArrayBegin(targetPropertyTransitiveWhitelist) + 1;
+ const char * const *transEnd =
+ cmArrayEnd(targetPropertyTransitiveWhitelist);
+
if (std::find_if(transBegin, transEnd,
- TransitiveWhitelistCompare(propertyName)) != transEnd)
+ cmStrCmp(propertyName)) != transEnd)
{
std::vector<std::string> libs;
@@ -949,7 +938,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
}
}
else if (std::find_if(transBegin, transEnd,
- TransitiveWhitelistCompare(interfacePropertyName)) != transEnd)
+ cmStrCmp(interfacePropertyName)) != transEnd)
{
const cmTarget::LinkImplementation *impl = target->GetLinkImplementation(
context->Config,
@@ -996,8 +985,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
}
for (size_t i = 1;
- i < (sizeof(targetPropertyTransitiveWhitelist) /
- sizeof(*targetPropertyTransitiveWhitelist));
+ i < cmArraySize(targetPropertyTransitiveWhitelist);
++i)
{
if (targetPropertyTransitiveWhitelist[i] == interfacePropertyName)
@@ -1113,10 +1101,7 @@ static const struct TargetPolicyNode : public cmGeneratorExpressionNode
context->HadContextSensitiveCondition = true;
- for (size_t i = 1;
- i < (sizeof(targetPolicyWhitelist) /
- sizeof(*targetPolicyWhitelist));
- ++i)
+ for (size_t i = 1; i < cmArraySize(targetPolicyWhitelist); ++i)
{
const char *policy = targetPolicyWhitelist[i];
if (parameters.front() == policy)
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 84dd299..21ee0fe 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -189,6 +189,9 @@ cmLoadedCommand::~cmLoadedCommand()
bool cmLoadCommandCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
+ if(this->Disallowed(cmPolicies::CMP0031,
+ "The load_command command should not be called; see CMP0031."))
+ { return true; }
if(args.size() < 1 )
{
return true;
diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h
index 918f32b..11bcf09 100644
--- a/Source/cmLoadCommandCommand.h
+++ b/Source/cmLoadCommandCommand.h
@@ -14,34 +14,14 @@
#include "cmCommand.h"
-/** \class cmLoadCommandCommand
- * \brief Load in a Command plugin
- *
- * cmLoadCommandCommand loads a command into CMake
- */
class cmLoadCommandCommand : public cmCommand
{
public:
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmLoadCommandCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
+ virtual cmCommand* Clone() { return new cmLoadCommandCommand; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
- /**
- * The name of the command as specified in CMakeList.txt.
- */
virtual const char* GetName() const {return "load_command";}
-
+ virtual bool IsDiscouraged() const { return true; }
cmTypeMacro(cmLoadCommandCommand, cmCommand);
};
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx
index 01fc2cf..16b2bea 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -174,6 +174,9 @@ void cmLBDepend::DependWalk(cmDependInformation* info)
bool cmOutputRequiredFilesCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
+ if(this->Disallowed(cmPolicies::CMP0032,
+ "The output_required_files command should not be called; see CMP0032."))
+ { return true; }
if(args.size() != 2 )
{
this->SetError("called with incorrect number of arguments");
diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h
index d43b229..dd5ed6c 100644
--- a/Source/cmOutputRequiredFilesCommand.h
+++ b/Source/cmOutputRequiredFilesCommand.h
@@ -15,45 +15,19 @@
#include "cmCommand.h"
#include "cmMakeDepend.h"
-/** \class cmOutputRequiredFilesCommand
- * \brief Output a list of required files for a source file
- *
- */
class cmOutputRequiredFilesCommand : public cmCommand
{
public:
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmOutputRequiredFilesCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
+ cmTypeMacro(cmOutputRequiredFilesCommand, cmCommand);
+ virtual cmCommand* Clone() { return new cmOutputRequiredFilesCommand; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
- /**
- * The name of the command as specified in CMakeList.txt.
- */
virtual const char* GetName() const { return "output_required_files";}
+ virtual bool IsDiscouraged() const { return true; }
- /** This command is kept for compatibility with older CMake versions. */
- virtual bool IsDiscouraged() const
- {
- return true;
- }
-
-
- cmTypeMacro(cmOutputRequiredFilesCommand, cmCommand);
void ListDependencies(cmDependInformation const *info,
FILE *fout,
std::set<cmDependInformation const*> *visited);
-
private:
std::string File;
std::string OutputFile;
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index f7efc1e..c05de17 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -246,6 +246,46 @@ cmPolicies::cmPolicies()
CMP0028, "CMP0028",
"Double colon in target name means ALIAS or IMPORTED target.",
3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0029, "CMP0029",
+ "The subdir_depends command should not be called.",
+ 3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0030, "CMP0030",
+ "The use_mangled_mesa command should not be called.",
+ 3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0031, "CMP0031",
+ "The load_command command should not be called.",
+ 3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0032, "CMP0032",
+ "The output_required_files command should not be called.",
+ 3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0033, "CMP0033",
+ "The export_library_dependencies command should not be called.",
+ 3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0034, "CMP0034",
+ "The utility_source command should not be called.",
+ 3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0035, "CMP0035",
+ "The variable_requires command should not be called.",
+ 3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0036, "CMP0036",
+ "The build_name command should not be called.",
+ 3,0,0,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 68cd7c2..9e72bdc 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -80,6 +80,14 @@ public:
CMP0027, ///< Conditionally linked imported targets with missing include
/// directories.
CMP0028, ///< Double colon in target name means ALIAS or IMPORTED target.
+ CMP0029, ///< Disallow command: subdir_depends
+ CMP0030, ///< Disallow command: use_mangled_mesa
+ CMP0031, ///< Disallow command: load_command
+ CMP0032, ///< Disallow command: output_required_files
+ CMP0033, ///< Disallow command: export_library_dependencies
+ CMP0034, ///< Disallow command: utility_source
+ CMP0035, ///< Disallow command: variable_requires
+ CMP0036, ///< Disallow command: build_name
/** \brief Always the last entry.
*
diff --git a/Source/cmRST.h b/Source/cmRST.h
index faae25f..1a3cd99 100644
--- a/Source/cmRST.h
+++ b/Source/cmRST.h
@@ -16,6 +16,16 @@
#include <cmsys/RegularExpression.hxx>
+/** \class cmRST
+ * \brief Perform basic .rst processing for command-line help
+ *
+ * This class implements a subset of reStructuredText and Sphinx
+ * document processing. It is used to print command-line help.
+ *
+ * If you modify the capabilities of this class, be sure to update
+ * the Help/manual/cmake-developer.7.rst documentation and to update
+ * the Tests/CMakeLib/testRST.(rst|expect) test input and output.
+ */
class cmRST
{
public:
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index d09b304..6c77144 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -377,6 +377,34 @@ static thisClass* SafeDownCast(cmObject *c) \
return 0;\
}
+#if defined(_MSC_VER) && _MSC_VER < 1300
+#define cmArrayBegin(a) a
+#define cmArraySize(a) (sizeof(a)/sizeof(*a))
+#define cmArrayEnd(a) a + cmArraySize(a)
+
+#else
+
+template<typename T, size_t N>
+const T* cmArrayBegin(const T (&a)[N]) { return a; }
+template<typename T, size_t N>
+const T* cmArrayEnd(const T (&a)[N]) { return a + N; }
+template<typename T, size_t N>
+size_t cmArraySize(const T (&)[N]) { return N; }
+
+#endif
+
+struct cmStrCmp {
+ cmStrCmp(const char *test) : m_test(test) {}
+ cmStrCmp(std::string &test) : m_test(test.c_str()) {}
+
+ bool operator()(const char * input)
+ {
+ return strcmp(input, m_test) == 0;
+ }
+
+private:
+ const char *m_test;
+};
#endif
diff --git a/Source/cmSubdirDependsCommand.cxx b/Source/cmSubdirDependsCommand.cxx
index 2af7bf1..9381983 100644
--- a/Source/cmSubdirDependsCommand.cxx
+++ b/Source/cmSubdirDependsCommand.cxx
@@ -11,10 +11,10 @@
============================================================================*/
#include "cmSubdirDependsCommand.h"
-// cmSubdirDependsCommand
bool cmSubdirDependsCommand::InitialPass(std::vector<std::string> const& ,
cmExecutionStatus &)
{
+ this->Disallowed(cmPolicies::CMP0029,
+ "The subdir_depends command should not be called; see CMP0029.");
return true;
}
-
diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h
index e6f1f8f..f78cfb7 100644
--- a/Source/cmSubdirDependsCommand.h
+++ b/Source/cmSubdirDependsCommand.h
@@ -14,45 +14,15 @@
#include "cmCommand.h"
-/** \class cmSubdirDependsCommand
- * \brief Legacy command. Do not use.
- *
- * cmSubdirDependsCommand has been left in CMake for compatability with
- * projects already using it. Its functionality in supporting parallel
- * builds is now automatic. The command does not do anything.
- */
class cmSubdirDependsCommand : public cmCommand
{
public:
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmSubdirDependsCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
+ virtual cmCommand* Clone() { return new cmSubdirDependsCommand; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
- /**
- * The name of the command as specified in CMakeList.txt.
- */
virtual const char* GetName() const { return "subdir_depends";}
-
- /** This command is kept for compatibility with older CMake versions. */
- virtual bool IsDiscouraged() const
- {
- return true;
- }
-
+ virtual bool IsDiscouraged() const { return true; }
cmTypeMacro(cmSubdirDependsCommand, cmCommand);
};
-
-
#endif
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 126cdbd..ad4ae0c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -5311,6 +5311,25 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
{
case cmPolicies::WARN:
{
+ std::string oldLibraries;
+ std::string newLibraries;
+ const char *sep = "";
+ for(std::vector<std::string>::const_iterator it
+ = impl->Libraries.begin(); it != impl->Libraries.end(); ++it)
+ {
+ oldLibraries += sep;
+ oldLibraries += *it;
+ sep = ";";
+ }
+ sep = "";
+ for(std::vector<std::string>::const_iterator it
+ = ifaceLibs.begin(); it != ifaceLibs.end(); ++it)
+ {
+ newLibraries += sep;
+ newLibraries += *it;
+ sep = ";";
+ }
+
cmOStringStream w;
w << (this->Makefile->GetPolicies()
->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
@@ -5318,7 +5337,13 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
"INTERFACE_LINK_LIBRARIES property. This should be preferred "
"as the source of the link interface for this library. "
"Ignoring the property and using the link implementation "
- "as the link interface instead.";
+ "as the link interface instead."
+ "\n"
+ "INTERFACE_LINK_LIBRARIES:\n "
+ << newLibraries
+ << "\n"
+ << "Link implementation:\n "
+ << oldLibraries << "\n";
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
// Fall through
diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx
index 4c189e6..1bd579d 100644
--- a/Source/cmUseMangledMesaCommand.cxx
+++ b/Source/cmUseMangledMesaCommand.cxx
@@ -14,10 +14,12 @@
#include <cmsys/RegularExpression.hxx>
-// cmUseMangledMesaCommand
bool cmUseMangledMesaCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
+ if(this->Disallowed(cmPolicies::CMP0030,
+ "The use_mangled_mesa command should not be called; see CMP0030."))
+ { return true; }
// expected two arguments:
// arguement one: the full path to gl_mangle.h
// arguement two : directory for output of edited headers
diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h
index aac7814..dca75a5 100644
--- a/Source/cmUseMangledMesaCommand.h
+++ b/Source/cmUseMangledMesaCommand.h
@@ -14,54 +14,19 @@
#include "cmCommand.h"
-#include "cmSourceFile.h"
-
-/** \class cmUseMangledMesaCommand
- * \brief Create Tcl Wrappers for VTK classes.
- *
- * cmUseMangledMesaCommand is used to define a CMake variable include
- * path location by specifying a file and list of directories.
- */
class cmUseMangledMesaCommand : public cmCommand
{
public:
cmTypeMacro(cmUseMangledMesaCommand, cmCommand);
-
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmUseMangledMesaCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
+ virtual cmCommand* Clone() { return new cmUseMangledMesaCommand; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
- /**
- * The name of the command as specified in CMakeList.txt.
- */
virtual const char* GetName() const { return "use_mangled_mesa";}
-
- /**
- * This determines if the command is invoked when in script mode.
- */
virtual bool IsScriptable() const { return true; }
-
- /** This command is kept for compatibility with older CMake versions. */
- virtual bool IsDiscouraged() const
- {
- return true;
- }
-
+ virtual bool IsDiscouraged() const { return true; }
protected:
void CopyAndFullPathMesaHeader(const char* source,
const char* outdir);
};
-
#endif
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx
index 6ea3dfa..11e5108 100644
--- a/Source/cmUtilitySourceCommand.cxx
+++ b/Source/cmUtilitySourceCommand.cxx
@@ -15,6 +15,9 @@
bool cmUtilitySourceCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
+ if(this->Disallowed(cmPolicies::CMP0034,
+ "The utility_source command should not be called; see CMP0034."))
+ { return true; }
if(args.size() < 3)
{
this->SetError("called with incorrect number of arguments");
diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h
index 0a0653c..83d115c 100644
--- a/Source/cmUtilitySourceCommand.h
+++ b/Source/cmUtilitySourceCommand.h
@@ -14,48 +14,15 @@
#include "cmCommand.h"
-/** \class cmUtilitySourceCommand
- * \brief A command to setup a cache entry with the location of a third-party
- * utility's source.
- *
- * cmUtilitySourceCommand is used when a third-party utility's source is
- * included in the project's source tree. It specifies the location of
- * the executable's source, and any files that may be needed to confirm the
- * identity of the source.
- */
class cmUtilitySourceCommand : public cmCommand
{
public:
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmUtilitySourceCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
+ cmTypeMacro(cmUtilitySourceCommand, cmCommand);
+ virtual cmCommand* Clone() { return new cmUtilitySourceCommand; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
- /**
- * The name of the command as specified in CMakeList.txt.
- */
virtual const char* GetName() const { return "utility_source";}
-
- /** This command is kept for compatibility with older CMake versions. */
- virtual bool IsDiscouraged() const
- {
- return true;
- }
-
-
- cmTypeMacro(cmUtilitySourceCommand, cmCommand);
+ virtual bool IsDiscouraged() const { return true; }
};
-
-
#endif
diff --git a/Source/cmVariableRequiresCommand.cxx b/Source/cmVariableRequiresCommand.cxx
index 747e9be..ddb4003 100644
--- a/Source/cmVariableRequiresCommand.cxx
+++ b/Source/cmVariableRequiresCommand.cxx
@@ -16,6 +16,9 @@
bool cmVariableRequiresCommand
::InitialPass(std::vector<std::string>const& args, cmExecutionStatus &)
{
+ if(this->Disallowed(cmPolicies::CMP0035,
+ "The variable_requires command should not be called; see CMP0035."))
+ { return true; }
if(args.size() < 3 )
{
this->SetError("called with incorrect number of arguments");
diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h
index 1032745..881b149 100644
--- a/Source/cmVariableRequiresCommand.h
+++ b/Source/cmVariableRequiresCommand.h
@@ -14,40 +14,15 @@
#include "cmCommand.h"
-/** \class cmVariableRequiresCommand
- * \brief Displays a message to the user
- *
- */
class cmVariableRequiresCommand : public cmCommand
{
public:
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmVariableRequiresCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
+ cmTypeMacro(cmVariableRequiresCommand, cmCommand);
+ virtual cmCommand* Clone() { return new cmVariableRequiresCommand; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
-
- /**
- * The name of the command as specified in CMakeList.txt.
- */
virtual const char* GetName() const { return "variable_requires";}
-
- /** This command is kept for compatibility with older CMake versions. */
- virtual bool IsDiscouraged() const
- {
- return true;
- }
-
- cmTypeMacro(cmVariableRequiresCommand, cmCommand);
+ virtual bool IsDiscouraged() const { return true; }
};
diff --git a/Tests/Module/CheckTypeSize/CMakeLists.txt b/Tests/Module/CheckTypeSize/CMakeLists.txt
index abe617a..16989fe2 100644
--- a/Tests/Module/CheckTypeSize/CMakeLists.txt
+++ b/Tests/Module/CheckTypeSize/CMakeLists.txt
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 2.8.1 FATAL_ERROR)
-project(CheckTypeSize C)
+project(CheckTypeSize)
+# Check C types
include(CheckTypeSize)
check_type_size("void*" SIZEOF_DATA_PTR)
check_type_size(char SIZEOF_CHAR)
@@ -18,7 +19,19 @@ check_type_size("((struct somestruct*)0)->someint" SIZEOF_STRUCTMEMBER_INT)
check_type_size("((struct somestruct*)0)->someptr" SIZEOF_STRUCTMEMBER_PTR)
check_type_size("((struct somestruct*)0)->somechar" SIZEOF_STRUCTMEMBER_CHAR)
+# Check CXX types
+check_type_size(bool SIZEOF_BOOL LANGUAGE CXX)
+
+set(CMAKE_EXTRA_INCLUDE_FILES someclass.hxx)
+check_type_size("((ns::someclass*)0)->someint" SIZEOF_NS_CLASSMEMBER_INT LANGUAGE CXX)
+check_type_size("((ns::someclass*)0)->someptr" SIZEOF_NS_CLASSMEMBER_PTR LANGUAGE CXX)
+check_type_size("((ns::someclass*)0)->somechar" SIZEOF_NS_CLASSMEMBER_CHAR LANGUAGE CXX)
+check_type_size("((ns::someclass*)0)->somebool" SIZEOF_NS_CLASSMEMBER_BOOL LANGUAGE CXX)
+
configure_file(config.h.in config.h)
+configure_file(config.hxx.in config.hxx)
+
include_directories("${CheckTypeSize_BINARY_DIR}")
add_executable(CheckTypeSize CheckTypeSize.c)
+add_executable(CheckTypeSizeCXX CheckTypeSize.cxx)
diff --git a/Tests/Module/CheckTypeSize/CheckTypeSize.cxx b/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
new file mode 100644
index 0000000..b5692cd
--- /dev/null
+++ b/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
@@ -0,0 +1,172 @@
+#include "config.h"
+#include "config.hxx"
+#include "someclass.hxx"
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#include <stdio.h>
+
+#define CHECK(t,m) do { \
+ if(sizeof(t) != m) \
+ { \
+ printf(#m ": expected %d, got %d (line %d)\n", \
+ (int)sizeof(t), (int)m, __LINE__); \
+ result = 1; \
+ } \
+ } while(0)
+
+#define NODEF(m) do { \
+ printf(#m": not defined (line %d)\n", __LINE__); \
+ result = 1; \
+ } while(0)
+
+int main()
+{
+ int result = 0;
+ ns::someclass y;
+
+ /* void* */
+#if !defined(HAVE_SIZEOF_DATA_PTR)
+ NODEF(HAVE_SIZEOF_DATA_PTR);
+#endif
+#if defined(SIZEOF_DATA_PTR)
+ CHECK(void*, SIZEOF_DATA_PTR);
+#else
+ NODEF(SIZEOF_DATA_PTR);
+#endif
+
+ /* char */
+#if !defined(HAVE_SIZEOF_CHAR)
+ NODEF(HAVE_SIZEOF_CHAR);
+#endif
+#if defined(SIZEOF_CHAR)
+ CHECK(char, SIZEOF_CHAR);
+#else
+ NODEF(SIZEOF_CHAR);
+#endif
+
+ /* short */
+#if !defined(HAVE_SIZEOF_SHORT)
+ NODEF(HAVE_SIZEOF_SHORT);
+#endif
+#if defined(SIZEOF_SHORT)
+ CHECK(short, SIZEOF_SHORT);
+#else
+ NODEF(SIZEOF_SHORT);
+#endif
+
+ /* int */
+#if !defined(HAVE_SIZEOF_INT)
+ NODEF(HAVE_SIZEOF_INT);
+#endif
+#if defined(SIZEOF_INT)
+ CHECK(int, SIZEOF_INT);
+#else
+ NODEF(SIZEOF_INT);
+#endif
+
+ /* long */
+#if !defined(HAVE_SIZEOF_LONG)
+ NODEF(HAVE_SIZEOF_LONG);
+#endif
+#if defined(SIZEOF_LONG)
+ CHECK(long, SIZEOF_LONG);
+#else
+ NODEF(SIZEOF_LONG);
+#endif
+
+ /* long long */
+#if defined(SIZEOF_LONG_LONG)
+ CHECK(long long, SIZEOF_LONG_LONG);
+# if !defined(HAVE_SIZEOF_LONG_LONG)
+ NODEF(HAVE_SIZEOF_LONG_LONG);
+# endif
+#endif
+
+ /* __int64 */
+#if defined(SIZEOF___INT64)
+ CHECK(__int64, SIZEOF___INT64);
+# if !defined(HAVE_SIZEOF___INT64)
+ NODEF(HAVE_SIZEOF___INT64);
+# endif
+#elif defined(HAVE_SIZEOF___INT64)
+ NODEF(SIZEOF___INT64);
+#endif
+
+ /* size_t */
+#if !defined(HAVE_SIZEOF_SIZE_T)
+ NODEF(HAVE_SIZEOF_SIZE_T);
+#endif
+#if defined(SIZEOF_SIZE_T)
+ CHECK(size_t, SIZEOF_SIZE_T);
+#else
+ NODEF(SIZEOF_SIZE_T);
+#endif
+
+ /* ssize_t */
+#if defined(SIZEOF_SSIZE_T)
+ CHECK(ssize_t, SIZEOF_SSIZE_T);
+# if !defined(HAVE_SIZEOF_SSIZE_T)
+ NODEF(HAVE_SIZEOF_SSIZE_T);
+# endif
+#elif defined(HAVE_SIZEOF_SSIZE_T)
+ NODEF(SIZEOF_SSIZE_T);
+#endif
+
+ /* ns::someclass::someint */
+#if defined(SIZEOF_NS_CLASSMEMBER_INT)
+ CHECK(y.someint, SIZEOF_NS_CLASSMEMBER_INT);
+ CHECK(y.someint, SIZEOF_INT);
+# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_INT)
+ NODEF(HAVE_SIZEOF_STRUCTMEMBER_INT);
+# endif
+#elif defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
+ NODEF(SIZEOF_STRUCTMEMBER_INT);
+#endif
+
+ /* ns::someclass::someptr */
+#if defined(SIZEOF_NS_CLASSMEMBER_PTR)
+ CHECK(y.someptr, SIZEOF_NS_CLASSMEMBER_PTR);
+ CHECK(y.someptr, SIZEOF_DATA_PTR);
+# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
+ NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_PTR);
+# endif
+#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
+ NODEF(SIZEOF_NS_CLASSMEMBER_PTR);
+#endif
+
+ /* ns::someclass::somechar */
+#if defined(SIZEOF_NS_CLASSMEMBER_CHAR)
+ CHECK(y.somechar, SIZEOF_NS_CLASSMEMBER_CHAR);
+ CHECK(y.somechar, SIZEOF_CHAR);
+# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
+ NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR);
+# endif
+#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
+ NODEF(SIZEOF_NS_CLASSMEMBER_CHAR);
+#endif
+
+ /* ns::someclass::somebool */
+#if defined(SIZEOF_NS_CLASSMEMBER_BOOL)
+ CHECK(y.somechar, SIZEOF_NS_CLASSMEMBER_BOOL);
+ CHECK(y.somechar, SIZEOF_BOOL);
+# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
+ NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL);
+# endif
+#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
+ NODEF(SIZEOF_NS_CLASSMEMBER_BOOL);
+#endif
+
+ /* to avoid possible warnings about unused or write-only variable */
+ y.someint = result;
+
+ return y.someint;
+}
diff --git a/Tests/Module/CheckTypeSize/config.hxx.in b/Tests/Module/CheckTypeSize/config.hxx.in
new file mode 100644
index 0000000..8c66ade
--- /dev/null
+++ b/Tests/Module/CheckTypeSize/config.hxx.in
@@ -0,0 +1,23 @@
+#cmakedefine HAVE_SYS_TYPES_H
+#cmakedefine HAVE_STDINT_H
+#cmakedefine HAVE_STDDEF_H
+
+/* bool */
+#cmakedefine HAVE_SIZEOF_BOOL
+@SIZEOF_BOOL_CODE@
+
+/* struct ns::somestruct::someint */
+#cmakedefine HAVE_SIZEOF_NS_STRUCTMEMBER_INT
+@SIZEOF_NS_STRUCTMEMBER_INT_CODE@
+
+/* struct ns::somestruct::someptr */
+#cmakedefine HAVE_SIZEOF_NS_STRUCTMEMBER_PTR
+@SIZEOF_NS_STRUCTMEMBER_PTR_CODE@
+
+/* struct ns::somestruct::somechar */
+#cmakedefine HAVE_SIZEOF_NS_STRUCTMEMBER_CHAR
+@SIZEOF_NS_STRUCTMEMBER_CHAR_CODE@
+
+/* struct ns::somestruct::somebool */
+#cmakedefine HAVE_SIZEOF_NS_STRUCTMEMBER_BOOL
+@SIZEOF_NS_STRUCTMEMBER_BOOL_CODE@
diff --git a/Tests/Module/CheckTypeSize/someclass.hxx b/Tests/Module/CheckTypeSize/someclass.hxx
new file mode 100644
index 0000000..76c07ec
--- /dev/null
+++ b/Tests/Module/CheckTypeSize/someclass.hxx
@@ -0,0 +1,14 @@
+#ifndef _CMAKE_SOMECLASS_HXX
+#define _CMAKE_SOMECLASS_HXX
+
+namespace ns {
+class someclass {
+public:
+ int someint;
+ void *someptr;
+ char somechar;
+ bool somebool;
+};
+}
+
+#endif
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
index 41d132c..e41133a 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
@@ -7,4 +7,13 @@ CMake Warning \(dev\) in CMakeLists.txt:
should be preferred as the source of the link interface for this library.
Ignoring the property and using the link implementation as the link
interface instead.
+
+ INTERFACE_LINK_LIBRARIES:
+
+ foo
+
+ Link implementation:
+
+ bat
+
This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 3a0ea91..8148cb6 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -61,6 +61,7 @@ if(UNIX AND "${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles")
add_RunCMake_test(CompilerChange)
endif()
add_RunCMake_test(Configure)
+add_RunCMake_test(DisallowedCommands)
add_RunCMake_test(ExternalData)
add_RunCMake_test(FPHSA)
add_RunCMake_test(GeneratorExpression)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage-result.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage-stderr.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage-stderr.txt
new file mode 100644
index 0000000..07ec8e6
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at .*/Modules/CheckTypeSize.cmake:[0-9]+ \(message\):
+ Missing argument:
+
+ LANGUAGE arguments requires a value
+
+Call Stack \(most recent call first\):
+ CheckTypeSizeMissingLanguage.cmake:[0-9]+ \(check_type_size\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage.cmake
new file mode 100644
index 0000000..3fae6c4
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeMissingLanguage.cmake
@@ -0,0 +1,2 @@
+include(CheckTypeSize)
+check_type_size(int SIZEOF_INT LANGUAGE)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs-result.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs-stderr.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs-stderr.txt
new file mode 100644
index 0000000..a2d2fc0
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at .*/Modules/CheckTypeSize.cmake:[0-9]+. \(message\):
+ Unknown language:
+
+ .
+
+ Supported languages: C, CXX.
+
+Call Stack \(most recent call first\):
+ CheckTypeSizeMixedArgs.cmake:[0-9]+ \(check_type_size\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs.cmake
new file mode 100644
index 0000000..d2ccc0f
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeMixedArgs.cmake
@@ -0,0 +1,2 @@
+include(CheckTypeSize)
+check_type_size(int SIZEOF_INT LANGUAGE BUILTIN_TYPES_ONLY)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeOk.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeOk.cmake
new file mode 100644
index 0000000..558f07e
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeOk.cmake
@@ -0,0 +1,10 @@
+include(CheckTypeSize)
+check_type_size(int SIZEOF_INT)
+check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY)
+check_type_size(int SIZEOF_INT LANGUAGE C)
+check_type_size(int SIZEOF_INT LANGUAGE CXX)
+check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY LANGUAGE C)
+
+# Weird but ok... only last value is considered
+check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY BUILTIN_TYPES_ONLY)
+check_type_size(int SIZEOF_INT LANGUAGE C LANGUAGE CXX)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-result.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt
new file mode 100644
index 0000000..085488e
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at .*/Modules/CheckTypeSize.cmake:[0-9]+. \(message\):
+ Unknown argument:
+
+ LANGUAG
+
+Call Stack \(most recent call first\):
+ CheckTypeSizeUnknownArgument.cmake:[0-9]+ \(check_type_size\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake
new file mode 100644
index 0000000..6f24ee1
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake
@@ -0,0 +1,2 @@
+include(CheckTypeSize)
+check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY LANGUAG CXX)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage-result.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage-stderr.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage-stderr.txt
new file mode 100644
index 0000000..502a717
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error at .*/Modules/CheckTypeSize.cmake:[0-9]+. \(message\):
+ Unknown language:
+
+ FORTRAN.
+
+ Supported languages: C, CXX.
+
+Call Stack \(most recent call first\):
+ CheckTypeSizeUnknownLanguage.cmake:[0-9]+ \(check_type_size\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage.cmake
new file mode 100644
index 0000000..2d5184c
--- /dev/null
+++ b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownLanguage.cmake
@@ -0,0 +1,2 @@
+include(CheckTypeSize)
+check_type_size(int SIZEOF_INT LANGUAGE FORTRAN)
diff --git a/Tests/RunCMake/CheckModules/RunCMakeTest.cmake b/Tests/RunCMake/CheckModules/RunCMakeTest.cmake
index 6a6b36e..fda7ebf 100644
--- a/Tests/RunCMake/CheckModules/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckModules/RunCMakeTest.cmake
@@ -6,3 +6,9 @@ run_cmake(CheckStructHasMemberMissingLanguage)
run_cmake(CheckStructHasMemberMissingKey)
run_cmake(CheckStructHasMemberTooManyArguments)
run_cmake(CheckStructHasMemberWrongKey)
+
+run_cmake(CheckTypeSizeOk)
+run_cmake(CheckTypeSizeUnknownLanguage)
+run_cmake(CheckTypeSizeMissingLanguage)
+run_cmake(CheckTypeSizeUnknownArgument)
+run_cmake(CheckTypeSizeMixedArgs)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0029-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0029-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0029-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0029-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0029-NEW-stderr.txt
new file mode 100644
index 0000000..e147081
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0029-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0029-NEW.cmake:2 \(subdir_depends\):
+ The subdir_depends command should not be called; see CMP0029.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0029-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0029-NEW.cmake
new file mode 100644
index 0000000..392b9d4
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0029-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0029 NEW)
+subdir_depends()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0029-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0029-OLD-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0029-OLD-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0029-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0029-OLD.cmake
new file mode 100644
index 0000000..099fd90
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0029-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0029 OLD)
+subdir_depends()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0029-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0029-WARN-stderr.txt
new file mode 100644
index 0000000..32a452a
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0029-WARN-stderr.txt
@@ -0,0 +1,7 @@
+CMake Warning \(dev\) at CMP0029-WARN.cmake:1 \(subdir_depends\):
+ Policy CMP0029 is not set: The subdir_depends command should not be called.
+ Run "cmake --help-policy CMP0029" for policy details. Use the cmake_policy
+ command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0029-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0029-WARN.cmake
new file mode 100644
index 0000000..1ceb1f8
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0029-WARN.cmake
@@ -0,0 +1 @@
+subdir_depends()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0030-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0030-NEW-stderr.txt
new file mode 100644
index 0000000..cb380db
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0030-NEW.cmake:2 \(use_mangled_mesa\):
+ The use_mangled_mesa command should not be called; see CMP0030.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0030-NEW.cmake
new file mode 100644
index 0000000..73365a7
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0030 NEW)
+use_mangled_mesa()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0030-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0030-OLD-stderr.txt
new file mode 100644
index 0000000..e95e16f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-OLD-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at CMP0030-OLD.cmake:2 \(use_mangled_mesa\):
+ use_mangled_mesa called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0030-OLD.cmake
new file mode 100644
index 0000000..efbb852
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0030 OLD)
+use_mangled_mesa()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0030-WARN-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-WARN-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0030-WARN-stderr.txt
new file mode 100644
index 0000000..db3c23f13
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0030-WARN.cmake:1 \(use_mangled_mesa\):
+ Policy CMP0030 is not set: The use_mangled_mesa command should not be
+ called. Run "cmake --help-policy CMP0030" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0030-WARN.cmake:1 \(use_mangled_mesa\):
+ use_mangled_mesa called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0030-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0030-WARN.cmake
new file mode 100644
index 0000000..cbe0ff0
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0030-WARN.cmake
@@ -0,0 +1 @@
+use_mangled_mesa()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0031-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0031-NEW-stderr.txt
new file mode 100644
index 0000000..78c2236
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0031-NEW.cmake:2 \(load_command\):
+ The load_command command should not be called; see CMP0031.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0031-NEW.cmake
new file mode 100644
index 0000000..3d9caf2
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0031 NEW)
+load_command()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0031-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0031-OLD-stderr.txt
new file mode 100644
index 0000000..ba198d6
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-OLD-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0031-OLD.cmake:2 \(load_command\):
+ load_command Attempt to load command failed from file.*bogus_command.*
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0031-OLD.cmake
new file mode 100644
index 0000000..8fedf98
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0031 OLD)
+load_command(bogus_command)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0031-WARN-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-WARN-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0031-WARN-stderr.txt
new file mode 100644
index 0000000..4cb65b3
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0031-WARN.cmake:1 \(load_command\):
+ Policy CMP0031 is not set: The load_command command should not be called.
+ Run "cmake --help-policy CMP0031" for policy details. Use the cmake_policy
+ command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0031-WARN.cmake:1 \(load_command\):
+ load_command Attempt to load command failed from file.*bogus_command.*
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0031-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0031-WARN.cmake
new file mode 100644
index 0000000..c9d99fc
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0031-WARN.cmake
@@ -0,0 +1 @@
+load_command(bogus_command)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0032-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0032-NEW-stderr.txt
new file mode 100644
index 0000000..c7ac16e
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0032-NEW.cmake:2 \(output_required_files\):
+ The output_required_files command should not be called; see CMP0032.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0032-NEW.cmake
new file mode 100644
index 0000000..c6fb5e8
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0032 NEW)
+output_required_files()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0032-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0032-OLD-stderr.txt
new file mode 100644
index 0000000..2223c42
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-OLD-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0032-OLD.cmake:2 \(output_required_files\):
+ output_required_files called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0032-OLD.cmake
new file mode 100644
index 0000000..6585110
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0032 OLD)
+output_required_files()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0032-WARN-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-WARN-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0032-WARN-stderr.txt
new file mode 100644
index 0000000..0cf3f94
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0032-WARN.cmake:1 \(output_required_files\):
+ Policy CMP0032 is not set: The output_required_files command should not be
+ called. Run "cmake --help-policy CMP0032" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0032-WARN.cmake:1 \(output_required_files\):
+ output_required_files called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0032-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0032-WARN.cmake
new file mode 100644
index 0000000..7411e48
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0032-WARN.cmake
@@ -0,0 +1 @@
+output_required_files()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-stderr.txt
new file mode 100644
index 0000000..8d210aa
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0033-NEW.cmake:2 \(export_library_dependencies\):
+ The export_library_dependencies command should not be called; see CMP0033.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW.cmake
new file mode 100644
index 0000000..6f90f29
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0033 NEW)
+export_library_dependencies()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-stderr.txt
new file mode 100644
index 0000000..e5dd2dd
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0033-OLD.cmake:2 \(export_library_dependencies\):
+ export_library_dependencies called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD.cmake
new file mode 100644
index 0000000..a3504b6
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0033 OLD)
+export_library_dependencies()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-stderr.txt
new file mode 100644
index 0000000..e561dac
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0033-WARN.cmake:1 \(export_library_dependencies\):
+ Policy CMP0033 is not set: The export_library_dependencies command should
+ not be called. Run "cmake --help-policy CMP0033" for policy details. Use
+ the cmake_policy command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0033-WARN.cmake:1 \(export_library_dependencies\):
+ export_library_dependencies called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN.cmake
new file mode 100644
index 0000000..f897ddd
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN.cmake
@@ -0,0 +1 @@
+export_library_dependencies()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-stderr.txt
new file mode 100644
index 0000000..1dd279b
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0034-NEW.cmake:2 \(utility_source\):
+ The utility_source command should not be called; see CMP0034.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW.cmake
new file mode 100644
index 0000000..48724a9
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0034 NEW)
+utility_source()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-stderr.txt
new file mode 100644
index 0000000..3358628
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0034-OLD.cmake:2 \(utility_source\):
+ utility_source called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD.cmake
new file mode 100644
index 0000000..a2c9798
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0034 OLD)
+utility_source()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-stderr.txt
new file mode 100644
index 0000000..ea3831f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0034-WARN.cmake:1 \(utility_source\):
+ Policy CMP0034 is not set: The utility_source command should not be called.
+ Run "cmake --help-policy CMP0034" for policy details. Use the cmake_policy
+ command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0034-WARN.cmake:1 \(utility_source\):
+ utility_source called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0034-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN.cmake
new file mode 100644
index 0000000..b4ae045
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0034-WARN.cmake
@@ -0,0 +1 @@
+utility_source()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0035-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0035-NEW-stderr.txt
new file mode 100644
index 0000000..0604829
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0035-NEW.cmake:2 \(variable_requires\):
+ The variable_requires command should not be called; see CMP0035.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0035-NEW.cmake
new file mode 100644
index 0000000..27eb32e
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0035 NEW)
+variable_requires()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0035-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0035-OLD-stderr.txt
new file mode 100644
index 0000000..86eda43
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-OLD-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0035-OLD.cmake:2 \(variable_requires\):
+ variable_requires called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0035-OLD.cmake
new file mode 100644
index 0000000..7425262
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0035 OLD)
+variable_requires()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0035-WARN-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-WARN-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0035-WARN-stderr.txt
new file mode 100644
index 0000000..4d4fc8e
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0035-WARN.cmake:1 \(variable_requires\):
+ Policy CMP0035 is not set: The variable_requires command should not be
+ called. Run "cmake --help-policy CMP0035" for policy details. Use the
+ cmake_policy command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0035-WARN.cmake:1 \(variable_requires\):
+ variable_requires called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0035-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0035-WARN.cmake
new file mode 100644
index 0000000..3af4de1
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0035-WARN.cmake
@@ -0,0 +1 @@
+variable_requires()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0036-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0036-NEW-stderr.txt
new file mode 100644
index 0000000..11aabd0
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-NEW-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0036-NEW.cmake:2 \(build_name\):
+ The build_name command should not be called; see CMP0036.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0036-NEW.cmake
new file mode 100644
index 0000000..5341db2
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0036 NEW)
+build_name()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0036-OLD-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-OLD-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0036-OLD-stderr.txt
new file mode 100644
index 0000000..fef195f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-OLD-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at CMP0036-OLD.cmake:2 \(build_name\):
+ build_name called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0036-OLD.cmake
new file mode 100644
index 0000000..fdd840f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0036 OLD)
+build_name()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0036-WARN-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-WARN-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0036-WARN-stderr.txt
new file mode 100644
index 0000000..b9b7c5a
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0036-WARN.cmake:1 \(build_name\):
+ Policy CMP0036 is not set: The build_name command should not be called.
+ Run "cmake --help-policy CMP0036" for policy details. Use the cmake_policy
+ command to set the policy and suppress this warning.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Error at CMP0036-WARN.cmake:1 \(build_name\):
+ build_name called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0036-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0036-WARN.cmake
new file mode 100644
index 0000000..9556687
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMP0036-WARN.cmake
@@ -0,0 +1 @@
+build_name()
diff --git a/Tests/RunCMake/DisallowedCommands/CMakeLists.txt b/Tests/RunCMake/DisallowedCommands/CMakeLists.txt
new file mode 100644
index 0000000..e8db6b0
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
new file mode 100644
index 0000000..208ea20
--- /dev/null
+++ b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
@@ -0,0 +1,16 @@
+include(RunCMake)
+
+foreach(p
+ CMP0029
+ CMP0030
+ CMP0031
+ CMP0032
+ CMP0033
+ CMP0034
+ CMP0035
+ CMP0036
+ )
+ run_cmake(${p}-WARN)
+ run_cmake(${p}-OLD)
+ run_cmake(${p}-NEW)
+endforeach()
diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in
index 6c9cd77..5dbdede 100644
--- a/Utilities/Sphinx/conf.py.in
+++ b/Utilities/Sphinx/conf.py.in
@@ -40,6 +40,7 @@ man_pages = [
('manual/cmake-properties.7', 'cmake-properties', 'CMake Properties Reference', [], 7),
('manual/cmake-variables.7', 'cmake-variables', 'CMake Variables Reference', [], 7),
('manual/cmake-generator-expressions.7', 'cmake-generator-expressions', 'CMake Generator Expressions', [], 7),
+ ('manual/cmake-developer.7', 'cmake-developer', 'CMake Developer Reference', [], 7),
]
man_show_urls = False