summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraKateGenerator.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2014-02-16 10:35:30 (GMT)
committerBrad King <brad.king@kitware.com>2014-02-17 14:54:03 (GMT)
commit22e5c6c26b5baed0d9e0f398ea61667e7597d604 (patch)
treef0105febda0b900a563d6f262c44756f2f4b55e8 /Source/cmExtraKateGenerator.cxx
parent0c958c44af5020069efe41b2adf22115b75e8de1 (diff)
downloadCMake-22e5c6c26b5baed0d9e0f398ea61667e7597d604.zip
CMake-22e5c6c26b5baed0d9e0f398ea61667e7597d604.tar.gz
CMake-22e5c6c26b5baed0d9e0f398ea61667e7597d604.tar.bz2
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
Diffstat (limited to 'Source/cmExtraKateGenerator.cxx')
-rw-r--r--Source/cmExtraKateGenerator.cxx18
1 files changed, 9 insertions, 9 deletions
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 = ',';
}