summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-07-05 16:16:33 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-07-05 16:16:33 (GMT)
commit86195caf6ad23d6528748ad3879394b8709513c5 (patch)
tree2c48ed3825c1ad64ce0805d43a7cf2fb5e4b81e0 /Source/cmGlobalGenerator.cxx
parentbbc9e4a9dcbe293a5054cf8296fa4fce7e9cea35 (diff)
downloadCMake-86195caf6ad23d6528748ad3879394b8709513c5.zip
CMake-86195caf6ad23d6528748ad3879394b8709513c5.tar.gz
CMake-86195caf6ad23d6528748ad3879394b8709513c5.tar.bz2
ENH: add support for VCExpress 2005
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 14c78e8..907e111 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -74,9 +74,22 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
return;
}
std::string makeProgram = mf->GetDefinition("CMAKE_MAKE_PROGRAM");
+ // if there are spaces in the make program use short path
+ // but do not short path the actual program name, as
+ // this can cause trouble with VSExpress
if(makeProgram.find(' ') != makeProgram.npos)
{
+ std::string dir;
+ std::string file;
+ cmSystemTools::SplitProgramPath(makeProgram.c_str(),
+ dir, file);
+ std::string saveFile = file;
cmSystemTools::GetShortPath(makeProgram.c_str(), makeProgram);
+ cmSystemTools::SplitProgramPath(makeProgram.c_str(),
+ dir, file);
+ makeProgram = dir;
+ makeProgram += "/";
+ makeProgram += saveFile;
this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", makeProgram.c_str(),
"make program",
cmCacheManager::FILEPATH);