[Cmake-commits] CMake branch, next, updated. v3.7.1-1870-g2969f55
Gregor Jasny
gjasny at googlemail.com
Thu Dec 29 05:07:31 EST 2016
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 2969f55026a2bb77f063c6c119a9c9e3afc35854 (commit)
via 8263a78cab321419a6d8839e78317673cd2779a2 (commit)
from 3c5549e5d6d8b3651f7696e5f9daade18ffab621 (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=2969f55026a2bb77f063c6c119a9c9e3afc35854
commit 2969f55026a2bb77f063c6c119a9c9e3afc35854
Merge: 3c5549e 8263a78
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Thu Dec 29 05:07:28 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 29 05:07:28 2016 -0500
Merge topic '16253-xcode-effective-platform-name' into next
8263a78c fixup! Xcode: Always emit EFFECTIVE_PLATFORM_NAME
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8263a78cab321419a6d8839e78317673cd2779a2
commit 8263a78cab321419a6d8839e78317673cd2779a2
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Thu Dec 29 10:55:50 2016 +0100
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Thu Dec 29 10:55:50 2016 +0100
fixup! Xcode: Always emit EFFECTIVE_PLATFORM_NAME
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index aeda728..c2a76e4 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -4419,9 +4419,9 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config,
// The generator may add the configuration's subdirectory.
if (!conf.empty()) {
- bool isXcode = this->Makefile->IsOn("XCODE");
+ bool useEPN = this->Makefile->ShouldEmitEffectivePlatformName();
std::string suffix =
- usesDefaultOutputDir && isXcode ? "${EFFECTIVE_PLATFORM_NAME}" : "";
+ usesDefaultOutputDir && useEPN ? "${EFFECTIVE_PLATFORM_NAME}" : "";
this->LocalGenerator->GetGlobalGenerator()->AppendDirectoryForConfig(
"/", conf, suffix, out);
}
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 828a0ca..c2767f0 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2342,8 +2342,8 @@ void cmGlobalGenerator::AddGlobalTarget_Install(
singleLine.push_back(cmd);
if (cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') {
std::string cfgArg = "-DBUILD_TYPE=";
- bool isXcode = mf->IsOn("XCODE");
- if (isXcode) {
+ bool useEPN = mf->ShouldEmitEffectivePlatformName();
+ if (useEPN) {
cfgArg += "$(CONFIGURATION)";
singleLine.push_back(cfgArg);
cfgArg = "-DEFFECTIVE_PLATFORM_NAME=$(EFFECTIVE_PLATFORM_NAME)";
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index fccb486..0656b0a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2184,6 +2184,22 @@ bool cmMakefile::PlatformIsAppleIos() const
return false;
}
+bool cmMakefile::ShouldEmitEffectivePlatformName() const
+{
+ bool isXcode = this->IsOn("XCODE");
+ if (!isXcode) {
+ return false;
+ }
+
+ const char* xcodeVersion = this->GetDefinition("XCODE_VERSION");
+ if (!xcodeVersion ||
+ cmSystemTools::VersionCompareGreater("5", xcodeVersion)) {
+ return false;
+ }
+
+ return true;
+}
+
const char* cmMakefile::GetSONameFlag(const std::string& language) const
{
std::string name = "CMAKE_SHARED_LIBRARY_SONAME";
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 3484e5a..f929951 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -427,6 +427,9 @@ public:
/** Return whether the target platform is Apple iOS. */
bool PlatformIsAppleIos() const;
+ /** Return whether the generator should use EFFECTIVE_PLATFORM_NAME. */
+ bool ShouldEmitEffectivePlatformName() const;
+
/** Retrieve soname flag for the specified language if supported */
const char* GetSONameFlag(const std::string& language) const;
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorTarget.cxx | 4 ++--
Source/cmGlobalGenerator.cxx | 4 ++--
Source/cmMakefile.cxx | 16 ++++++++++++++++
Source/cmMakefile.h | 3 +++
4 files changed, 23 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list