From 8bd6cf0f33feed20d9ac5e8a7f8dd946b3589ff1 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sun, 29 Dec 2013 06:40:14 +0100 Subject: kate: the prev_target is not used by kate ...this was a leftover from experimenting Alex --- Source/cmExtraKateGenerator.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 177ef8d..8399fe8 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -90,7 +90,6 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf, "\t\"build\": {\n" "\t\t\"directory\": \"" << mf->GetHomeOutputDirectory() << "\",\n" "\t\t\"default_target\": \"all\",\n" - "\t\t\"prev_target\": \"all\",\n" "\t\t\"clean_target\": \"clean\",\n" "\t\t\"targets\":[\n"; -- cgit v0.12 From 424d5dc07844ee7ef21776e32caaf137b33f8358 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sun, 29 Dec 2013 07:00:24 +0100 Subject: kate: support also the build plugin in kate <= 4.12 With this patch, simply also the information used by the build plugin in kate <= 4.12 is put into the generated json file. The new build plugin (coming in 4.13) simply ignores this (and vice versa). Alex --- Source/cmExtraKateGenerator.cxx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index 8399fe8..ba67fda 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -86,17 +86,28 @@ void cmExtraKateGenerator::WriteTargets(const cmMakefile* mf, cmGeneratedFileStream& fout) const { + const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); + const std::string makeArgs = mf->GetSafeDefinition( + "CMAKE_KATE_MAKE_ARGUMENTS"); + const char* homeOutputDir = mf->GetHomeOutputDirectory(); + fout << "\t\"build\": {\n" "\t\t\"directory\": \"" << mf->GetHomeOutputDirectory() << "\",\n" "\t\t\"default_target\": \"all\",\n" - "\t\t\"clean_target\": \"clean\",\n" - "\t\t\"targets\":[\n"; + "\t\t\"clean_target\": \"clean\",\n"; - const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); - const std::string makeArgs = mf->GetSafeDefinition( - "CMAKE_KATE_MAKE_ARGUMENTS"); - const char* homeOutputDir = mf->GetHomeOutputDirectory(); + // 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"; + + // this is for kate >= 4.13: + fout << + "\t\t\"targets\":[\n"; this->AppendTarget(fout, "all", make, makeArgs, homeOutputDir, homeOutputDir); -- cgit v0.12 From 37104d97b012574ab4d3725a077611e2d31e1547 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sun, 29 Dec 2013 07:07:59 +0100 Subject: kate: put full path to cmake into comment Alex --- Source/cmExtraKateGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx index ba67fda..0312488 100644 --- a/Source/cmExtraKateGenerator.cxx +++ b/Source/cmExtraKateGenerator.cxx @@ -247,7 +247,8 @@ cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const return; } - fout << "#Generated by cmake, do not edit.\n"; + fout << "#Generated by " << mf->GetRequiredDefinition("CMAKE_COMMAND") + << ", do not edit.\n"; } -- cgit v0.12