summaryrefslogtreecommitdiffstats
path: root/Source/cmAddTestCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddTestCommand.cxx')
-rw-r--r--Source/cmAddTestCommand.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx
index 6b95f03..527622d 100644
--- a/Source/cmAddTestCommand.cxx
+++ b/Source/cmAddTestCommand.cxx
@@ -75,7 +75,14 @@ void cmAddTestCommand::FinalPass()
++it;
for (; it != m_Args.end(); ++it)
{
- fout << " " << (*it).c_str();
+ if(it->find(" ") != std::string::npos)
+ {
+ fout << " \"" << *it << "\"";
+ }
+ else
+ {
+ fout << " " << *it;
+ }
}
fout << ")" << std::endl;
fout.close();