summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2010-01-24 20:11:58 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2010-01-24 20:11:58 (GMT)
commit5f540dcbf35828ac4bb96673a063197e108d617a (patch)
treea2031f94be4dde300308ebe4764128987df8b211 /Source/cmExtraCodeBlocksGenerator.cxx
parent0999bd7fb8999dccfe9c85e08abc2b1295e5d5bb (diff)
downloadCMake-5f540dcbf35828ac4bb96673a063197e108d617a.zip
CMake-5f540dcbf35828ac4bb96673a063197e108d617a.tar.gz
CMake-5f540dcbf35828ac4bb96673a063197e108d617a.tar.bz2
-make paths with spaces work in the CodeBlocks generator with MinGW (#10014)
Alex
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 4bedea3..5cbef8c 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -545,7 +545,6 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
{
std::string makefileName = makefile->GetStartOutputDirectory();
makefileName += "/Makefile";
- makefileName = cmSystemTools::ConvertToOutputPath(makefileName.c_str());
fout<<" <Target title=\"" << targetName << "\">\n";
if (target!=0)
@@ -696,22 +695,27 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand(
std::string command = make;
if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0)
{
+ std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
command += " /NOLOGO /f &quot;";
- command += makefile;
+ command += makefileName;
command += "&quot; ";
command += target;
}
else if (strcmp(this->GlobalGenerator->GetName(), "MinGW Makefiles")==0)
{
- command += " -f ";
- command += makefile;
- command += " ";
+ // no escaping of spaces in this case, see
+ // http://public.kitware.com/Bug/view.php?id=10014
+ std::string makefileName = makefile;
+ command += " -f &quot;";
+ command += makefileName;
+ command += "&quot; ";
command += target;
}
else
{
+ std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
command += " -f &quot;";
- command += makefile;
+ command += makefileName;
command += "&quot; ";
command += target;
}