[Cmake-commits] CMake branch, next, updated. v2.8.4-1370-g0f92762
Brad King
brad.king at kitware.com
Thu Apr 7 14:18:32 EDT 2011
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 0f92762c872cf4896b594e09da3d99ea26a432d1 (commit)
via c519bb2bb60a95c8b9145af0d9c90900f5b48f3d (commit)
from 9c56172a70a27e2864f58b763ac328b9ce07a9af (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=0f92762c872cf4896b594e09da3d99ea26a432d1
commit 0f92762c872cf4896b594e09da3d99ea26a432d1
Merge: 9c56172 c519bb2
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 7 14:18:29 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Apr 7 14:18:29 2011 -0400
Merge topic 'xcode-attribute-conditions' into next
c519bb2 XCode: Also qoute [] as needed to set build-configurations.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c519bb2bb60a95c8b9145af0d9c90900f5b48f3d
commit c519bb2bb60a95c8b9145af0d9c90900f5b48f3d
Author: Johan Björk <phb at spotify.com>
AuthorDate: Tue Apr 5 15:25:58 2011 +0200
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Apr 7 13:17:03 2011 -0400
XCode: Also qoute [] as needed to set build-configurations.
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 5920470..71c7c25 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -146,13 +146,15 @@ void cmXCodeObject::Print(std::ostream& out)
if(j->second->TypeValue == STRING)
{
- out << j->first << " = ";
+ cmXCodeObject::PrintString(out,j->first);
+ out << " = ";
j->second->PrintString(out);
out << ";";
}
else if(j->second->TypeValue == OBJECT_LIST)
{
- out << j->first << " = (";
+ cmXCodeObject::PrintString(out,j->first);
+ out << " = (";
for(unsigned int k = 0; k < j->second->List.size(); k++)
{
if(j->second->List[k]->TypeValue == STRING)
@@ -169,7 +171,8 @@ void cmXCodeObject::Print(std::ostream& out)
}
else
{
- out << j->first << " = error_unexpected_TypeValue_" <<
+ cmXCodeObject::PrintString(out,j->first);
+ out << " = error_unexpected_TypeValue_" <<
j->second->TypeValue << ";";
}
@@ -180,7 +183,8 @@ void cmXCodeObject::Print(std::ostream& out)
}
else if(object->TypeValue == OBJECT_REF)
{
- out << i->first << " = " << object->Object->Id;
+ cmXCodeObject::PrintString(out,i->first);
+ out << " = " << object->Object->Id;
if(object->Object->HasComment() && i->first != "remoteGlobalIDString")
{
out << " ";
@@ -190,7 +194,8 @@ void cmXCodeObject::Print(std::ostream& out)
}
else if(object->TypeValue == STRING)
{
- out << i->first << " = ";
+ cmXCodeObject::PrintString(out,i->first);
+ out << " = ";
object->PrintString(out);
out << ";" << separator;
}
@@ -230,19 +235,19 @@ void cmXCodeObject::CopyAttributes(cmXCodeObject* copy)
}
//----------------------------------------------------------------------------
-void cmXCodeObject::PrintString(std::ostream& os) const
+void cmXCodeObject::PrintString(std::ostream& os,cmStdString String)
{
// The string needs to be quoted if it contains any characters
// considered special by the Xcode project file parser.
bool needQuote =
- (this->String.empty() ||
- this->String.find_first_of(" <>.+-=@$") != this->String.npos);
+ (String.empty() ||
+ String.find_first_of(" <>.+-=@$[]") != String.npos);
const char* quote = needQuote? "\"" : "";
// Print the string, quoted and escaped as necessary.
os << quote;
- for(std::string::const_iterator i = this->String.begin();
- i != this->String.end(); ++i)
+ for(std::string::const_iterator i = String.begin();
+ i != String.end(); ++i)
{
if(*i == '"')
{
@@ -254,6 +259,11 @@ void cmXCodeObject::PrintString(std::ostream& os) const
os << quote;
}
+void cmXCodeObject::PrintString(std::ostream& os) const
+{
+ cmXCodeObject::PrintString(os,this->String);
+}
+
//----------------------------------------------------------------------------
void cmXCodeObject::SetString(const char* s)
{
diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h
index 2bea63b..bdb4f15 100644
--- a/Source/cmXCodeObject.h
+++ b/Source/cmXCodeObject.h
@@ -141,6 +141,7 @@ public:
}
std::vector<cmXCodeObject*> const& GetObjectList() { return this->List;}
void SetComment(const char* c) { this->Comment = c;}
+ static void PrintString(std::ostream& os,cmStdString String);
protected:
void PrintString(std::ostream& os) const;
-----------------------------------------------------------------------
Summary of changes:
Source/cmXCodeObject.cxx | 30 ++++++++++++++++++++----------
Source/cmXCodeObject.h | 1 +
2 files changed, 21 insertions(+), 10 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list