summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-07 15:16:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-05-07 15:17:26 (GMT)
commitfa077acba51393030586aa50f5eff9d6034c5c11 (patch)
tree3e4cee2462589525b03c447d399d868399f57d40 /Help/command
parentbe132dc6a6b5a979bdd115880911296e50c961a0 (diff)
parent1527defbfe4ae9cb8f74d5954c790c403727063b (diff)
downloadCMake-fa077acba51393030586aa50f5eff9d6034c5c11.zip
CMake-fa077acba51393030586aa50f5eff9d6034c5c11.tar.gz
CMake-fa077acba51393030586aa50f5eff9d6034c5c11.tar.bz2
Merge topic 'enforce-explicit-use-of-project'
1527defbfe cmMakefile: Enforce explicit use of project() command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3245
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/project.rst15
1 files changed, 8 insertions, 7 deletions
diff --git a/Help/command/project.rst b/Help/command/project.rst
index 7e33ccd..41e1112 100644
--- a/Help/command/project.rst
+++ b/Help/command/project.rst
@@ -112,12 +112,13 @@ Usage
The top-level ``CMakeLists.txt`` file for a project must contain a
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``).
+call exists, CMake will issue a warning and pretend there is a
+``project(Project)`` at the top to enable 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
- :command:`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`.
+ Call the :command:`project()` command near the top of the top-level
+ ``CMakeLists.txt``, but *after* calling :command:`cmake_minimum_required`.
+ It is important to establish version and policy settings before invoking
+ other commands whose behavior they may affect.
+ See also policy :policy:`CMP0000`.