summaryrefslogtreecommitdiffstats
path: root/Source/cmaketest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-04-03 21:14:06 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-04-03 21:14:06 (GMT)
commitd42055b283496e3259a89db9aa9074f4169bcf34 (patch)
treea2f35c6fc56e7e313c6c091b2f4903b79d922822 /Source/cmaketest.cxx
parent1c73117b7add8578bfe1abc3db7de754496e2453 (diff)
downloadCMake-d42055b283496e3259a89db9aa9074f4169bcf34.zip
CMake-d42055b283496e3259a89db9aa9074f4169bcf34.tar.gz
CMake-d42055b283496e3259a89db9aa9074f4169bcf34.tar.bz2
ENH: fix more space problems, you can add args to the ExecProgram command separatly now
Diffstat (limited to 'Source/cmaketest.cxx')
-rw-r--r--Source/cmaketest.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx
index 37a3d98..4f35bcf 100644
--- a/Source/cmaketest.cxx
+++ b/Source/cmaketest.cxx
@@ -157,13 +157,7 @@ int main (int argc, char **argv)
#if defined(_WIN32) && !defined(__CYGWIN__)
if(makeCommand.find(' ') != std::string::npos)
{
- char *buffer = new char[makeCommand.size()+1];
- if(GetShortPathName(makeCommand.c_str(), buffer,
- int(makeCommand.size()+1)) != 0)
- {
- makeCommand = buffer;
- }
- delete [] buffer;\
+ cmSystemTools::GetShortPath(makeCommand.c_str(), makeCommand);
}
#endif
makeCommand += " ";
@@ -177,13 +171,7 @@ int main (int argc, char **argv)
#if defined(_WIN32) && !defined(__CYGWIN__)
if(makeCommand.find(' ') != std::string::npos)
{
- char *buffer = new char[makeCommand.size()+1];
- if(GetShortPathName(makeCommand.c_str(), buffer,
- int(makeCommand.size()+1)) != 0)
- {
- makeCommand = buffer;
- }
- delete [] buffer;\
+ cmSystemTools::GetShortPath(makeCommand.c_str(), makeCommand);
}
#endif
makeCommand += " ";