Merge topic 'fix-xcode-attribute-LOCATIONs'
764775c4
Fix XCODE_ATTRIBUTE_..._LOCATION target property lookup
This commit is contained in:
commit
e9cae187c3
|
@ -1164,7 +1164,8 @@ const char* cmTarget::GetProperty(const std::string& prop,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Support "<CONFIG>_LOCATION".
|
// 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);
|
std::string configName(prop.c_str(), prop.size() - 9);
|
||||||
if (configName != "IMPORTED") {
|
if (configName != "IMPORTED") {
|
||||||
if (!this->HandleLocationPropertyPolicy(context)) {
|
if (!this->HandleLocationPropertyPolicy(context)) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
include(RunCMake)
|
include(RunCMake)
|
||||||
|
|
||||||
run_cmake(XcodeFileType)
|
run_cmake(XcodeFileType)
|
||||||
|
run_cmake(XcodeAttributeLocation)
|
||||||
run_cmake(XcodeAttributeGenex)
|
run_cmake(XcodeAttributeGenex)
|
||||||
run_cmake(XcodeAttributeGenexError)
|
run_cmake(XcodeAttributeGenexError)
|
||||||
run_cmake(XcodeObjectNeedsEscape)
|
run_cmake(XcodeObjectNeedsEscape)
|
||||||
|
|
|
@ -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()
|
|
@ -0,0 +1,3 @@
|
||||||
|
enable_language(C)
|
||||||
|
add_executable(some main.c)
|
||||||
|
set_property(TARGET some PROPERTY XCODE_ATTRIBUTE_DEPLOYMENT_LOCATION YES)
|
Loading…
Reference in New Issue