[Cmake-commits] CMake branch, next, updated. v2.8.8-2990-g9c92d76
Stephen Kelly
steveire at gmail.com
Mon Jun 4 18:31:30 EDT 2012
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 9c92d76839494a6ed333696c10546f4817cf56e1 (commit)
via 774507823114f46f5a8658df81a1873bae67d8cb (commit)
from 19a6e8f2db9307e2ea8624a89cd5a203efab7837 (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=9c92d76839494a6ed333696c10546f4817cf56e1
commit 9c92d76839494a6ed333696c10546f4817cf56e1
Merge: 19a6e8f 7745078
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jun 4 18:31:29 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 4 18:31:29 2012 -0400
Merge topic 'position-independent-targets' into next
7745078 Use GetSafeDefinition instead of GetRequiredDefinition.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=774507823114f46f5a8658df81a1873bae67d8cb
commit 774507823114f46f5a8658df81a1873bae67d8cb
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 5 00:26:48 2012 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jun 5 00:30:33 2012 +0200
Use GetSafeDefinition instead of GetRequiredDefinition.
I had thought before that the variable was required in the existing
code path, but now that I look again, I don't see that that is the case.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 4014475..f3a7090 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -590,9 +590,12 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
std::string sharedLibFlagsVar = "CMAKE_SHARED_LIBRARY_";
sharedLibFlagsVar += lang;
sharedLibFlagsVar += "_FLAGS";
- std::string sharedLibFlags =
- mf->GetRequiredDefinition(sharedLibFlagsVar.c_str());
- this->LanguageToOriginalSharedLibFlags[lang] = sharedLibFlags;
+ const char* sharedLibFlags =
+ mf->GetSafeDefinition(sharedLibFlagsVar.c_str());
+ if (sharedLibFlags)
+ {
+ this->LanguageToOriginalSharedLibFlags[lang] = sharedLibFlags;
+ }
} // end for each language
// Now load files that can override any settings on the platform or for
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index c3df658..5fc5f05 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1994,10 +1994,10 @@ bool cmLocalGenerator::GetShouldUseOldFlags(bool shared,
std::string flagsVar = "CMAKE_SHARED_LIBRARY_";
flagsVar += lang;
flagsVar += "_FLAGS";
- std::string flags =
- this->Makefile->GetRequiredDefinition(flagsVar.c_str());
+ const char* flags =
+ this->Makefile->GetSafeDefinition(flagsVar.c_str());
- if (flags != originalFlags)
+ if (flags && flags != originalFlags)
{
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0018))
{
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalGenerator.cxx | 9 ++++++---
Source/cmLocalGenerator.cxx | 6 +++---
2 files changed, 9 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list