summaryrefslogtreecommitdiffstats
path: root/Source/cmaketest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-11-21 22:45:01 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-11-21 22:45:01 (GMT)
commit12551a33c394cd06a082f2df2ad550e38d762a98 (patch)
tree7d1358ac4841807d28ea9e2d7f18b65390df7acf /Source/cmaketest.cxx
parent66135bee42c1743eab8f4f64d87585a9824d6d37 (diff)
downloadCMake-12551a33c394cd06a082f2df2ad550e38d762a98.zip
CMake-12551a33c394cd06a082f2df2ad550e38d762a98.tar.gz
CMake-12551a33c394cd06a082f2df2ad550e38d762a98.tar.bz2
NMake with spaces in directories
Diffstat (limited to 'Source/cmaketest.cxx')
-rw-r--r--Source/cmaketest.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx
index 8c5fa8d..95a2787 100644
--- a/Source/cmaketest.cxx
+++ b/Source/cmaketest.cxx
@@ -68,6 +68,10 @@ int main (int argc, char *argv[])
cmListFileCache::GetInstance()->ClearCache();
// now build the test
std::string makeCommand = MAKEPROGRAM;
+ if(makeCommand.size() == 0)
+ {
+ std::cerr << "Error: cmaketest does not have a valid MAKEPROGRAM\n";
+ }
std::string lowerCaseCommand = makeCommand;
cmSystemTools::LowerCase(lowerCaseCommand);
// if msdev is the make program then do the following
@@ -76,18 +80,18 @@ int main (int argc, char *argv[])
// if there are spaces in the makeCommand, assume a full path
// and convert it to a path with no spaces in it as the
// RunCommand does not like spaces
+#if defined(_WIN32) && !defined(__CYGWIN__)
if(makeCommand.find(' ') != std::string::npos)
{
char *buffer = new char[makeCommand.size()+1];
-#if defined(_WIN32) && !defined(__CYGWIN__)
if(GetShortPathName(makeCommand.c_str(), buffer,
makeCommand.size()+1) != 0)
{
makeCommand = buffer;
}
-#endif
delete [] buffer;\
}
+#endif
makeCommand += " ";
makeCommand += executableName;
makeCommand += ".dsw /MAKE \"ALL_BUILD - Debug\" /REBUILD";