summaryrefslogtreecommitdiffstats
path: root/Source/cmaketest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-10-26 19:42:02 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-10-26 19:42:02 (GMT)
commit1c5c899fd7b9e0f5214f0e30b5dc64fa2508a27c (patch)
tree18146e750e78da7a94d3783248ac3cd61c1f240a /Source/cmaketest.cxx
parentf586f7df8d9ab5a432107e053452864598c6c0a7 (diff)
downloadCMake-1c5c899fd7b9e0f5214f0e30b5dc64fa2508a27c.zip
CMake-1c5c899fd7b9e0f5214f0e30b5dc64fa2508a27c.tar.gz
CMake-1c5c899fd7b9e0f5214f0e30b5dc64fa2508a27c.tar.bz2
add dependency for configure files and use short path in WIN32 cmake test
Diffstat (limited to 'Source/cmaketest.cxx')
-rw-r--r--Source/cmaketest.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx
index 8756601..571e2f7 100644
--- a/Source/cmaketest.cxx
+++ b/Source/cmaketest.cxx
@@ -3,6 +3,9 @@
#include "cmake.h"
#include "cmListFileCache.h"
#include "cmMakefileGenerator.h"
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
+#include "windows.h"
+#endif
// this is a test driver program for cmake.
int main (int argc, char *argv[])
@@ -60,8 +63,21 @@ int main (int argc, char *argv[])
cmListFileCache::GetInstance()->ClearCache();
// now build the test
std::string makeCommand = MAKEPROGRAM;
- makeCommand += " ";
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
+ // 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(makeCommand.find(' ') != std::string::npos)
+ {
+ char *buffer = new char[makeCommand.size()+1];
+ if(GetShortPathName(makeCommand.c_str(), buffer,
+ makeCommand.size()+1) != 0)
+ {
+ makeCommand = buffer;
+ delete [] buffer;
+ }
+ }
+ makeCommand += " ";
makeCommand += executableName;
makeCommand += ".dsw /MAKE \"ALL_BUILD - Debug\" /REBUILD";
#else