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  d805f1e55d5ea409b307aa3fa1af5e05430768b8 (commit)
       via  764775c4dd7b97e753d566d363c7ce9968343b5b (commit)
      from  2195bcc4a615dfc1a6af67c912a8e924abc95b32 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d805f1e55d5ea409b307aa3fa1af5e05430768b8
commit d805f1e55d5ea409b307aa3fa1af5e05430768b8
Merge: 2195bcc 764775c
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Sep 22 11:37:23 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Sep 22 11:37:23 2016 -0400

    Merge topic 'fix-xcode-attribute-LOCATIONs' into next
    
    764775c4 Fix XCODE_ATTRIBUTE_..._LOCATION target property lookup


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=764775c4dd7b97e753d566d363c7ce9968343b5b
commit 764775c4dd7b97e753d566d363c7ce9968343b5b
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Sep 22 11:03:40 2016 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Sep 22 11:29:52 2016 -0400

    Fix XCODE_ATTRIBUTE_..._LOCATION target property lookup
    
    Refactoring in commit v3.5.0-rc1~272^2~16 (cmGeneratorTarget: Add API for
    property keys, 2015-10-25) changed the Xcode generator implementation of
    `XCODE_ATTRIBUTE_...` properties to use the target `GetProperty` method on 
each
    `XCODE_ATTRIBUTE_...` property listed by `GetPropertyKeys` instead of 
looping
    over the property entries directly.  This made the lookup of property names 
of
    the form `XCODE_ATTRIBUTE_..._LOCATION` accidentally trigger the computed
    property logic for the undocumented/legacy `<CONFIG>_LOCATION` property.  Of
    course the computed property value is not the same as the value stored in 
the
    `XCODE_ATTRIBUTE_..._LOCATION` property.  Fix the computed property logic to
    avoid triggering on `XCODE_ATTRIBUTE_...` attributes.
    
    Closes: #16319

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1dad742..eb17561 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1164,7 +1164,8 @@ const char* cmTarget::GetProperty(const std::string& prop,
       }
     }
     // Support "<CONFIG>_LOCATION".
-    else if (cmHasLiteralSuffix(prop, "_LOCATION")) {
+    else if (cmHasLiteralSuffix(prop, "_LOCATION") &&
+             !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) {
       std::string configName(prop.c_str(), prop.size() - 9);
       if (configName != "IMPORTED") {
         if (!this->HandleLocationPropertyPolicy(context)) {
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake 
b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 0684d57..d43c80d 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
 include(RunCMake)
 
 run_cmake(XcodeFileType)
+run_cmake(XcodeAttributeLocation)
 run_cmake(XcodeAttributeGenex)
 run_cmake(XcodeAttributeGenexError)
 run_cmake(XcodeObjectNeedsEscape)
diff --git a/Tests/RunCMake/XcodeProject/XcodeAttributeLocation-check.cmake 
b/Tests/RunCMake/XcodeProject/XcodeAttributeLocation-check.cmake
new file mode 100644
index 0000000..2f55131
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeAttributeLocation-check.cmake
@@ -0,0 +1,7 @@
+set(expect "DEPLOYMENT_LOCATION = YES")
+file(STRINGS 
${RunCMake_TEST_BINARY_DIR}/XcodeAttributeLocation.xcodeproj/project.pbxproj 
actual
+  REGEX "DEPLOYMENT_LOCATION = .*;" LIMIT_COUNT 1)
+if(NOT "${actual}" MATCHES "${expect}")
+  message(SEND_ERROR "The actual project contains the line:\n ${actual}\n"
+    "which does not match expected regex:\n ${expect}\n")
+endif()
diff --git a/Tests/RunCMake/XcodeProject/XcodeAttributeLocation.cmake 
b/Tests/RunCMake/XcodeProject/XcodeAttributeLocation.cmake
new file mode 100644
index 0000000..5ab5528
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeAttributeLocation.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+add_executable(some main.c)
+set_property(TARGET some PROPERTY XCODE_ATTRIBUTE_DEPLOYMENT_LOCATION YES)

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

Summary of changes:
 Source/cmTarget.cxx                                              |    3 ++-
 Tests/RunCMake/XcodeProject/RunCMakeTest.cmake                   |    1 +
 ...eedsEscape-check.cmake => XcodeAttributeLocation-check.cmake} |    6 +++---
 Tests/RunCMake/XcodeProject/XcodeAttributeLocation.cmake         |    3 +++
 4 files changed, 9 insertions(+), 4 deletions(-)
 copy Tests/RunCMake/XcodeProject/{XcodeObjectNeedsEscape-check.cmake => 
XcodeAttributeLocation-check.cmake} (54%)
 create mode 100644 Tests/RunCMake/XcodeProject/XcodeAttributeLocation.cmake


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to