summaryrefslogtreecommitdiffstats
path: root/Source/cmAddTestCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-10-30 19:00:59 (GMT)
committerBrad King <brad.king@kitware.com>2003-10-30 19:00:59 (GMT)
commitcc3887c462390019b4d2a3dc2261b9665960752c (patch)
treec094204b9fea1bfe853965a46808b3e9d8007d7e /Source/cmAddTestCommand.cxx
parentf2e6d5790b3e11ce1a190ebe1e994c31bac7fe36 (diff)
downloadCMake-cc3887c462390019b4d2a3dc2261b9665960752c.zip
CMake-cc3887c462390019b4d2a3dc2261b9665960752c.tar.gz
CMake-cc3887c462390019b4d2a3dc2261b9665960752c.tar.bz2
BUG#259: Do not double quote arguments if they are already quoted when writing DartTestfile.txt.
Diffstat (limited to 'Source/cmAddTestCommand.cxx')
-rw-r--r--Source/cmAddTestCommand.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx
index 5802779..b3defb8 100644
--- a/Source/cmAddTestCommand.cxx
+++ b/Source/cmAddTestCommand.cxx
@@ -67,18 +67,19 @@ void cmAddTestCommand::FinalPass()
++it;
for (; it != m_Args.end(); ++it)
{
- if(it->find(" ") != std::string::npos)
- {
- fout << " \"" << *it << "\"";
- }
- else
- {
- fout << " " << *it;
- }
+ if((it->find(" ") != std::string::npos) &&
+ (*it->begin() != '"' || *(it->end()-1) != '"'))
+ {
+ fout << " \"" << *it << "\"";
+ }
+ else
+ {
+ fout << " " << *it;
+ }
}
fout << ")" << std::endl;
fout.close();
- }
+ }
return;
}