summaryrefslogtreecommitdiffstats
path: root/Help/command/project.rst
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-29 12:42:10 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-29 12:49:59 (GMT)
commit6ac3712da0f1e90884a27d9c03974260f42d04f7 (patch)
tree2d4aa00656077f278e7c4639c633c1342a7acf5e /Help/command/project.rst
parentf0673c1022afdc9f9d91ea460efc6790b7aa6289 (diff)
downloadCMake-6ac3712da0f1e90884a27d9c03974260f42d04f7.zip
CMake-6ac3712da0f1e90884a27d9c03974260f42d04f7.tar.gz
CMake-6ac3712da0f1e90884a27d9c03974260f42d04f7.tar.bz2
Help: Document that cmake_minimum_required should be called first
Many projects put their project() call first, but the actions taken by this command can be influenced by policies and other information set by a call to cmake_minimum_required. Document in each of these two commands that cmake_minimum_required should be called first. Suggested-by: Alan W. Irwin
Diffstat (limited to 'Help/command/project.rst')
-rw-r--r--Help/command/project.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Help/command/project.rst b/Help/command/project.rst
index c601a01..6c5ace7 100644
--- a/Help/command/project.rst
+++ b/Help/command/project.rst
@@ -55,3 +55,10 @@ literal, direct call to the :command:`project` command; loading one
through the :command:`include` command is not sufficient. If no such
call exists CMake will implicitly add one to the top that enables the
default languages (``C`` and ``CXX``).
+
+.. note::
+ Call the :command:`cmake_minimum_required` command at the beginning
+ of the top-level ``CMakeLists.txt`` file even before calling the
+ ``project()`` command. It is important to establish version and
+ policy settings before invoking other commands whose behavior they
+ may affect. See also policy :policy:`CMP0000`.