diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/target_link_libraries.rst | 3 | ||||
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 21 | ||||
-rw-r--r-- | Help/manual/cmake.1.rst | 13 | ||||
-rw-r--r-- | Help/policy/CMP0017.rst | 2 | ||||
-rw-r--r-- | Help/policy/CMP0028.rst | 23 |
5 files changed, 49 insertions, 13 deletions
diff --git a/Help/command/target_link_libraries.rst b/Help/command/target_link_libraries.rst index a1e3e22..41265fd 100644 --- a/Help/command/target_link_libraries.rst +++ b/Help/command/target_link_libraries.rst @@ -59,10 +59,11 @@ for <target>: If an <item> is a library in a Mac OX framework, the Headers directory of the framework will also be processed as a "usage requirement". This has the same effect as passing the framework directory as an -include directory. target_link_libraries(<target> +include directory. :: + target_link_libraries(<target> <PRIVATE|PUBLIC|INTERFACE> <lib> ... [<PRIVATE|PUBLIC|INTERFACE> <lib> ... ] ...]) diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 658620f..cb328ee 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -5,6 +5,26 @@ cmake-policies(7) .. contents:: +Introduction +============ + +Policies in CMake are used to preserve backward compatible behavior +across multiple releases. When a new policy is introduced, newer CMake +versions will begin to warn about the backward compatible behavior. It +is possible to disable the warning by explicitly requesting the OLD, or +backward compatible behavior using the :command:`cmake_policy` command. +It is also possible to request NEW, or non-backward compatible behavior +for a policy, also avoiding the warning. + +The :command:`cmake_minimum_required` command does more than report an +error if a too-old version of CMake is used to build a project. It +also sets all policies introduced in that CMake version or earlier to +NEW behavior. + +The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used +to determine whether to report an error on use of deprecated macros or +functions. + All Policies ============ @@ -37,3 +57,4 @@ All Policies /policy/CMP0025 /policy/CMP0026 /policy/CMP0027 + /policy/CMP0028 diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 64d0fb3..d2a45aa 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -33,15 +33,9 @@ native tool on their platform. copy_directory, copy_if_different, echo, echo_append, environment, make_directory, md5sum, remove, remove_directory, rename, tar, time, touch, touch_nocreate. In addition, some platform specific commands - are available. On Windows: comspec, delete_regv, write_regv. On + are available. On Windows: delete_regv, write_regv. On UNIX: create_symlink. -* ``-i``: Run in wizard mode. - - Wizard mode runs cmake interactively without a GUI. The user is - prompted to answer questions about the project configuration. The - answers are used to set cmake cache values. - * ``-L[A][H]``: List non-advanced cached variables. List cache variables will run CMake and list all the variables from @@ -64,10 +58,7 @@ native tool on their platform. --config <cfg> = For multi-configuration tools, choose <cfg>. --clean-first = Build target 'clean' first, then build. (To clean only, use --target 'clean'.) - --use-stderr = Don't merge stdout/stderr output and pass the - original stdout/stderr handles to the native - tool so it can use the capabilities of the - calling terminal (e.g. colored output). + --use-stderr = Ignored. Behavior is default in CMake >= 3.0. -- = Pass remaining options to the native tool. Run cmake --build with no options for quick help. diff --git a/Help/policy/CMP0017.rst b/Help/policy/CMP0017.rst index c93e8b2..f74e6f0 100644 --- a/Help/policy/CMP0017.rst +++ b/Help/policy/CMP0017.rst @@ -11,7 +11,7 @@ the modules belonging to CMake always get those files included which they expect, and against which they were developed and tested. In all other cases, the files found in CMAKE_MODULE_PATH still take precedence over the ones in the CMake module directory. The OLD -behaviour is to always prefer files from CMAKE_MODULE_PATH over files +behavior is to always prefer files from CMAKE_MODULE_PATH over files from the CMake modules directory. This policy was introduced in CMake version 2.8.4. CMake version diff --git a/Help/policy/CMP0028.rst b/Help/policy/CMP0028.rst new file mode 100644 index 0000000..ec318a0 --- /dev/null +++ b/Help/policy/CMP0028.rst @@ -0,0 +1,23 @@ +CMP0028 +------- + +Double colon in target name means ALIAS or IMPORTED target. + +CMake 2.8.12 and lower allowed the use of targets and files with double +colons in target_link_libraries, with some buildsystem generators. + +The use of double-colons is a common pattern used to namespace IMPORTED +targets and ALIAS targets. When computing the link dependencies of a target, +the name of each dependency could either be a target, or a file on disk. +Previously, if a target was not found with a matching name, the name was +considered to refer to a file on disk. This can lead to confusing error +messages if there is a typo in what should be a target name. + +The OLD behavior for this policy is to search for targets, then files on disk, +even if the search term contains double-colons. The NEW behavior for this +policy is to issue a FATAL_ERROR if a link dependency contains +double-colons but is not an IMPORTED target or an ALIAS target. + +This policy was introduced in CMake version 3.0.0. CMake version +|release| warns when the policy is not set and uses OLD behavior. Use +the cmake_policy command to set it to OLD or NEW explicitly. |