[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6895-g3bf8da3
Stephen Kelly
steveire at gmail.com
Thu Jan 9 08:57:47 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 3bf8da318d8d4fbd4abe84d4a299aa8193e92b07 (commit)
via fa3592b94142fb3a97699203ccc771d27d201b0d (commit)
via 3cec090daf1ac41aa62d10542832fe8c44649790 (commit)
from c5c24c3bdf85ecf596cae62c2809da7d24a4d9ff (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3bf8da318d8d4fbd4abe84d4a299aa8193e92b07
commit 3bf8da318d8d4fbd4abe84d4a299aa8193e92b07
Merge: c5c24c3 fa3592b
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jan 9 08:57:46 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 9 08:57:46 2014 -0500
Merge topic 'extend-docs' into next
fa3592b Help: Link to CMAKE_POLICY_DEFAULT_CMP<NNNN> in policies manual.
3cec090 Help: Add notes about relocatability of config-file packages.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa3592b94142fb3a97699203ccc771d27d201b0d
commit fa3592b94142fb3a97699203ccc771d27d201b0d
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jan 9 14:53:38 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Jan 9 14:53:38 2014 +0100
Help: Link to CMAKE_POLICY_DEFAULT_CMP<NNNN> in policies manual.
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 9138660..8818a24 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -16,7 +16,9 @@ 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.
+for a policy, also avoiding the warning. The default behavior for a policy is
+to warn by default, but that may be overridden from the command line by
+setting the :variable:`CMAKE_POLICY_DEFAULT_CMP<NNNN>` variable.
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
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cec090daf1ac41aa62d10542832fe8c44649790
commit 3cec090daf1ac41aa62d10542832fe8c44649790
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 7 18:15:27 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Jan 9 14:53:02 2014 +0100
Help: Add notes about relocatability of config-file packages.
diff --git a/Help/manual/cmake-packages.7.rst b/Help/manual/cmake-packages.7.rst
index b572bf7..b5447a6 100644
--- a/Help/manual/cmake-packages.7.rst
+++ b/Help/manual/cmake-packages.7.rst
@@ -392,11 +392,47 @@ should be provided by the ``ClimbingStats`` package, they should
be in a separate file which is installed to the same location as the
``ClimbingStatsConfig.cmake`` file, and included from there.
+Packages created by :command:`install(EXPORT)` are designed to be relocatable,
+using paths relative to the location of the package itself. When defining
+the interface of a target for ``EXPORT``, keep in mind that the include
+directories should be specified as relative paths which are relative to the
+:variable:`CMAKE_INSTALL_PREFIX`:
+
+.. code-block:: cmake
+
+ target_include_directories(tgt INTERFACE
+ # Wrong, not relocatable:
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include/TgtName>
+ )
+
+ target_include_directories(tgt INTERFACE
+ # Ok, relocatable:
+ $<INSTALL_INTERFACE:include/TgtName>
+ )
+
+The ``$<INSTALL_PREFIX>``
+:manual:`generator expression <cmake-generator-expressions(7)>` may be used as
+a placeholder for the install prefix without resulting in a non-relocatable
+package. This is necessary if complex generator expressions are used:
+
+.. code-block:: cmake
+
+ target_include_directories(tgt INTERFACE
+ # Ok, relocatable:
+ $<INSTALL_INTERFACE:$<$<CONFIG:Debug>:$<INSTALL_PREFIX>/include/TgtName>>
+ )
+
+As a special case, packages are not relocatable if installed to the ``/usr``
+or ``/`` prefix on linux, and ``/lib`` is a symlink to ``/usr/lib``. This is
+a workaround for some linux distros creating such a symlink and causing the
+relative paths to be evaluated incorrectly. As installations to ``/usr`` are
+generally managed by a package manager, they do not need to be relocatable.
+
The :command:`export(EXPORT)` command creates an :prop_tgt:`IMPORTED` targets
-definition file which is specific to the build-tree. This can similiarly be
-used with a suitable package configuration file and package version file to
-define a package for the build tree which may be used without installation.
-Consumers of the build tree can simply ensure that the
+definition file which is specific to the build-tree, and is not relocatable.
+This can similiarly be used with a suitable package configuration file and
+package version file to define a package for the build tree which may be used
+without installation. Consumers of the build tree can simply ensure that the
:variable:`CMAKE_PREFIX_PATH` contains the build directory, or set the
``ClimbingStats_DIR`` to ``<build_dir>/ClimbingStats`` in the cache.
-----------------------------------------------------------------------
Summary of changes:
Help/manual/cmake-packages.7.rst | 44 ++++++++++++++++++++++++++++++++++---
Help/manual/cmake-policies.7.rst | 4 ++-
2 files changed, 43 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list