[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5346-g142d5f7
Brad King
brad.king at kitware.com
Tue Nov 19 09:41:28 EST 2013
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 142d5f721b585266389e52033e1958db54a7683d (commit)
via 3a8f34b98cbbe8001f1645516701623a78504611 (commit)
from a38808ac0b8fa993e31e2837c67201c762061ea0 (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=142d5f721b585266389e52033e1958db54a7683d
commit 142d5f721b585266389e52033e1958db54a7683d
Merge: a38808a 3a8f34b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 19 09:41:22 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 19 09:41:22 2013 -0500
Merge topic 'fix-remove-forbidden-flags' into next
3a8f34b Makefile: Remove "forbidden" flags only as a whole
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a8f34b98cbbe8001f1645516701623a78504611
commit 3a8f34b98cbbe8001f1645516701623a78504611
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri Nov 15 21:41:11 2013 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 19 09:39:50 2013 -0500
Makefile: Remove "forbidden" flags only as a whole
Fix CMAKE_<LANG>_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS implementation to
only remove whole flags. Without this n the Mac we were incorrectly
removing -w from -Wno-write-strings.
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 6770e10..2fcad79 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -27,6 +27,7 @@
#include "cmMakefileLibraryTargetGenerator.h"
#include "cmMakefileUtilityTargetGenerator.h"
+#include <ctype.h>
cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
: OSXBundleGenerator(0)
@@ -1694,10 +1695,42 @@ void cmMakefileTargetGenerator::RemoveForbiddenFlags(const char* flagVar,
this->Makefile->GetSafeDefinition(removeFlags.c_str());
std::vector<std::string> removeList;
cmSystemTools::ExpandListArgument(removeflags, removeList);
+
for(std::vector<std::string>::iterator i = removeList.begin();
i != removeList.end(); ++i)
{
- cmSystemTools::ReplaceString(linkFlags, i->c_str(), "");
+ std::string tmp;
+ std::string::size_type lastPosition = 0;
+
+ for(;;)
+ {
+ std::string::size_type position = linkFlags.find(*i, lastPosition);
+
+ if(position == std::string::npos)
+ {
+ tmp += linkFlags.substr(lastPosition);
+ break;
+ }
+ else
+ {
+ std::string::size_type prefixLength = position - lastPosition;
+ tmp += linkFlags.substr(lastPosition, prefixLength);
+ lastPosition = position + i->length();
+
+ bool validFlagStart = position == 0 ||
+ isspace(linkFlags[position - 1]);
+
+ bool validFlagEnd = lastPosition == linkFlags.size() ||
+ isspace(linkFlags[lastPosition]);
+
+ if(!validFlagStart || !validFlagEnd)
+ {
+ tmp += *i;
+ }
+ }
+ }
+
+ linkFlags = tmp;
}
}
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list