summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
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);