summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-02 19:24:39 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-01-02 19:24:39 (GMT)
commit5249948e53392c91e55ccb0d8cf0e7d1a1db0d57 (patch)
treeff125b97bda1e3047e1c5c52cf93fd0de1fd9560 /Source
parent81311c670e02a554ba5e5c45329c4eda9c89bd72 (diff)
parent37104d97b012574ab4d3725a077611e2d31e1547 (diff)
downloadCMake-5249948e53392c91e55ccb0d8cf0e7d1a1db0d57.zip
CMake-5249948e53392c91e55ccb0d8cf0e7d1a1db0d57.tar.gz
CMake-5249948e53392c91e55ccb0d8cf0e7d1a1db0d57.tar.bz2
Merge topic 'KateProjectImprovements'
37104d9 kate: put full path to cmake into comment 424d5dc kate: support also the build plugin in kate <= 4.12 8bd6cf0 kate: the prev_target is not used by kate
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraKateGenerator.cxx27
1 files changed, 19 insertions, 8 deletions
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index 177ef8d..0312488 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -86,18 +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\"prev_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);
@@ -237,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";
}