summaryrefslogtreecommitdiff
path: root/Source/cmAddTestCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-02-22 15:40:44 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2002-02-22 15:40:44 -0500
commitb8d2413156333bc5917319dc6de1ca07a8fb3897 (patch)
treec34f85dc235879b5c8bc06297022a75dee756a82 /Source/cmAddTestCommand.cxx
parent8c3400dc6b61cc8bd524ca4f53dc0ef2d6eb6ef1 (diff)
downloadcmake-b8d2413156333bc5917319dc6de1ca07a8fb3897.tar.gz
ENH: fix for spaces in paths on unix
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 6b95f030cd..527622dc77 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();