|
@@ -112,12 +112,13 @@ Usage
|
|
|
The top-level ``CMakeLists.txt`` file for a project must contain a
|
|
The top-level ``CMakeLists.txt`` file for a project must contain a
|
|
|
literal, direct call to the :command:`project` command; loading one
|
|
literal, direct call to the :command:`project` command; loading one
|
|
|
through the :command:`include` command is not sufficient. If no such
|
|
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::
|
|
.. 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`.
|