[Cmake-commits] CMake branch, next, updated. v2.8.3-1274-g5477047

Brad King brad.king at kitware.com
Mon Jan 10 12:12:09 EST 2011


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  5477047b201a92efa09c49b0afe9d65b754a0eb1 (commit)
       via  57344977f563b129b0c93d9fc60d75747a89dd8b (commit)
      from  cf6b8169df6e2bfa2cb15e44bc35901744f49528 (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=5477047b201a92efa09c49b0afe9d65b754a0eb1
commit 5477047b201a92efa09c49b0afe9d65b754a0eb1
Merge: cf6b816 5734497
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 10 12:12:04 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 10 12:12:04 2011 -0500

    Merge topic 'doc-LOCATION-property-undefined-behavior' into next
    
    5734497 Document reading LOCATION_<CONFIG> early as undefined (#11671)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57344977f563b129b0c93d9fc60d75747a89dd8b
commit 57344977f563b129b0c93d9fc60d75747a89dd8b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 10 12:07:32 2011 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 10 12:07:32 2011 -0500

    Document reading LOCATION_<CONFIG> early as undefined (#11671)
    
    Although the LOCATION property is for compatibility with CMake 2.4, the
    LOCATION_<CONFIG> property is modern.  However, if a project reads it
    and sets location-altering properties later the behavior is undefined.
    See parent commit for details.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 7617cca..52574e2 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -501,6 +501,15 @@ void cmTarget::DefineProperties(cmake *cm)
      "value is the default.  "
      "See documentation of CMAKE_<LANG>_LINKER_PREFERENCE variables.");
 
+#define CM_LOCATION_UNDEFINED_BEHAVIOR \
+  "\n" \
+  "Do not set properties that affect the location of the target after " \
+  "reading this property.  These include properties whose names match " \
+  "\"(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_<CONFIG>)?\" " \
+  "or \"(IMPLIB_)?(PREFIX|SUFFIX)\".  " \
+  "Failure to follow this rule is not diagnosed and leaves the location " \
+  "of the target undefined."
+
   cm->DefineProperty
     ("LOCATION", cmProperty::TARGET,
      "Read-only location of a target on disk.",
@@ -520,14 +529,7 @@ void cmTarget::DefineProperties(cmake *cm)
      "In CMake 2.8.4 and above add_custom_command recognizes generator "
      "expressions to refer to target locations anywhere in the command.  "
      "Therefore this property is not needed for creating custom commands."
-     "\n"
-     "Do not read this property until after all other properties that can "
-     "affect the location of the target have been set.  "
-     "These include properties whose names match "
-     "\"(IMPLIB_)?(PREFIX|SUFFIX)\" or "
-     "\"(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_<CONFIG>)?\".  "
-     "Failure to follow this rule is not diagnosed and leaves the location "
-     "of the target undefined.");
+     CM_LOCATION_UNDEFINED_BEHAVIOR);
 
   cm->DefineProperty
     ("LOCATION_<CONFIG>", cmProperty::TARGET,
@@ -540,7 +542,8 @@ void cmTarget::DefineProperties(cmake *cm)
      "By default CMake looks for an exact-match but otherwise uses an "
      "arbitrary available configuration.  "
      "Use the MAP_IMPORTED_CONFIG_<CONFIG> property to map imported "
-     "configurations explicitly.");
+     "configurations explicitly."
+     CM_LOCATION_UNDEFINED_BEHAVIOR);
 
   cm->DefineProperty
     ("LINK_DEPENDS", cmProperty::TARGET,

-----------------------------------------------------------------------

Summary of changes:
 Source/cmTarget.cxx |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list