From 5f540dcbf35828ac4bb96673a063197e108d617a Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 24 Jan 2010 15:11:58 -0500 Subject: [PATCH] -make paths with spaces work in the CodeBlocks generator with MinGW (#10014) Alex --- Source/cmExtraCodeBlocksGenerator.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 4bedea357..5cbef8c37 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<<" \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 ""; - command += makefile; + command += makefileName; command += "" "; 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 ""; + command += makefileName; + command += "" "; command += target; } else { + std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile); command += " -f ""; - command += makefile; + command += makefileName; command += "" "; command += target; }