From 22e5c6c26b5baed0d9e0f398ea61667e7597d604 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sun, 16 Feb 2014 11:35:30 +0100 Subject: Kate: handle spaces in build dir They need to be escaped in the json file... I'm quite sure I tested this before, obviously I didn't test it correctly. Alex --- Source/CTest/cmCTestReadCustomFilesCommand.cxx | 1 - Source/cmExtraKateGenerator.cxx | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.cxx b/Source/CTest/cmCTestReadCustomFilesCommand.cxx index 5db01f9..3b9d552 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.cxx +++ b/Source/CTest/cmCTestReadCustomFilesCommand.cxx @@ -10,7 +10,6 @@ See the License for more information. ============================================================================*/ #include "cmCTestReadCustomFilesCommand.h" - #include "cmCTest.h" bool cmCTestReadCustomFilesCommand diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index d0f83b2..a0d37d4 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -98,12 +98,12 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf, "\t\t\"clean_target\": \"clean\",\n"; // build, clean and quick are for the build plugin kate <= 4.12: - fout << "\t\t\"build\": \"" << make << " -C " << homeOutputDir - << " " << makeArgs << " " << "all\",\n"; - fout << "\t\t\"clean\": \"" << make << " -C " << homeOutputDir - << " " << makeArgs << " " << "clean\",\n"; - fout << "\t\t\"quick\": \"" << make << " -C " << homeOutputDir - << " " << makeArgs << " " << "install\",\n"; + fout << "\t\t\"build\": \"" << make << " -C \\\"" << homeOutputDir + << "\\\" " << makeArgs << " " << "all\",\n"; + fout << "\t\t\"clean\": \"" << make << " -C \\\"" << homeOutputDir + << "\\\" " << makeArgs << " " << "clean\",\n"; + fout << "\t\t\"quick\": \"" << make << " -C \\\"" << homeOutputDir + << "\\\" " << makeArgs << " " << "install\",\n"; // this is for kate >= 4.13: fout << @@ -225,9 +225,9 @@ cmExtraKateGenerator::AppendTarget(cmGeneratedFileStream& fout, fout << "\t\t\t" << JsonSep << "{\"name\":\"" << target << "\", " "\"build_cmd\":\"" << make - << " -C " << (this->UseNinja ? homeOutputDir : path.c_str()) - << " " << makeArgs << " " - << target << "\"}\n"; + << " -C \\\"" << (this->UseNinja ? homeOutputDir : path.c_str()) + << "\\\" " << makeArgs << " " + << target << "\"}\n"; JsonSep = ','; } -- cgit v0.12