[Cmake-commits] CMake branch, next, updated. v3.0.0-4553-ge5c672d
Brad King
brad.king at kitware.com
Mon Jul 28 13:14:58 EDT 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 e5c672d0d46ee61ccd9c789ba0aaf0c20916b567 (commit)
via 608cf8149ccbf8954926ab7c86fd658099a52f7b (commit)
from 53ecb02357acb3e5b520aa400d1205e8d823b957 (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=e5c672d0d46ee61ccd9c789ba0aaf0c20916b567
commit e5c672d0d46ee61ccd9c789ba0aaf0c20916b567
Merge: 53ecb02 608cf81
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 28 13:14:58 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 28 13:14:58 2014 -0400
Merge topic 'xcode-6-librarian-flags' into next
608cf814 Xcode: Fix static library creation for Xcode 6 (#15038)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=608cf8149ccbf8954926ab7c86fd658099a52f7b
commit 608cf8149ccbf8954926ab7c86fd658099a52f7b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 28 11:41:53 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 28 13:06:33 2014 -0400
Xcode: Fix static library creation for Xcode 6 (#15038)
Xcode 6 introduced an 'OTHER_LIBTOOLFLAGS' setting for the "Other
Librarian Flags" of a static library. Now 'OTHER_LDFLAGS' are ignored.
Teach the Xcode generator to choose the correct name for the build
setting based on the type of target and the version of Xcode.
Inspired-by: Jamie Kirkpatrick <jkp at spotify.com>
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 484b28f..3503e19 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2298,7 +2298,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
}
- buildSettings->AddAttribute("OTHER_LDFLAGS",
+ buildSettings->AddAttribute(this->GetTargetLinkFlagsVar(target),
this->CreateString(extraLinkOptions.c_str()));
buildSettings->AddAttribute("OTHER_REZFLAGS",
this->CreateString(""));
@@ -2522,6 +2522,22 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
}
//----------------------------------------------------------------------------
+const char*
+cmGlobalXCodeGenerator::GetTargetLinkFlagsVar(cmTarget const& cmtarget) const
+{
+ if(this->XcodeVersion >= 60 &&
+ (cmtarget.GetType() == cmTarget::STATIC_LIBRARY ||
+ cmtarget.GetType() == cmTarget::OBJECT_LIBRARY))
+ {
+ return "OTHER_LIBTOOLFLAGS";
+ }
+ else
+ {
+ return "OTHER_LDFLAGS";
+ }
+}
+
+//----------------------------------------------------------------------------
const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget)
{
switch(cmtarget.GetType())
@@ -2834,8 +2850,9 @@ void cmGlobalXCodeGenerator
sep = " ";
linkObjs += this->XCodeEscapePath(oi->c_str());
}
- this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS",
- linkObjs.c_str(), configName);
+ this->AppendBuildSettingAttribute(
+ target, this->GetTargetLinkFlagsVar(*cmtarget),
+ linkObjs.c_str(), configName);
}
// Skip link information for object libraries.
@@ -2913,8 +2930,9 @@ void cmGlobalXCodeGenerator
target->AddDependTarget(configName, li->Target->GetName());
}
}
- this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS",
- linkLibs.c_str(), configName);
+ this->AppendBuildSettingAttribute(
+ target, this->GetTargetLinkFlagsVar(*cmtarget),
+ linkLibs.c_str(), configName);
}
}
}
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index c9d20c2..a7b54e9 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -141,6 +141,7 @@ private:
cmXCodeObject* buildPhases);
void ForceLinkerLanguages();
void ForceLinkerLanguage(cmTarget& cmtarget);
+ const char* GetTargetLinkFlagsVar(cmTarget const& cmtarget) const;
const char* GetTargetFileType(cmTarget& cmtarget);
const char* GetTargetProductType(cmTarget& cmtarget);
std::string AddConfigurations(cmXCodeObject* target, cmTarget& cmtarget);
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalXCodeGenerator.cxx | 28 +++++++++++++++++++++++-----
Source/cmGlobalXCodeGenerator.h | 1 +
2 files changed, 24 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list