From d31b1aca3fcf5d8c0e7ab5cbb37045ad87dead79 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Tue, 1 Nov 2011 21:23:52 +0100 Subject: [PATCH] Eclipse: quote the build dir (to make it work with spaces) When creating the targets for Eclipse, quote the directory in which make should change. Otherwise it will fail if the path contains with spaces. Alex --- Source/cmExtraEclipseCDT4Generator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index eab149ead..a338031d8 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -998,9 +998,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const std::string virtDir = "[Targets]/"; virtDir += prefix; virtDir += ti->first; - std::string buildArgs = "-C "; + std::string buildArgs = "-C \""; buildArgs += makefile->GetHomeOutputDirectory(); - buildArgs += " "; + buildArgs += "\" "; buildArgs += makeArgs; this->AppendTarget(fout, "Build", make, buildArgs, virtDir, "", ti->first.c_str());