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
This commit is contained in:
commit
5249948e53
@ -86,19 +86,29 @@ void
|
|||||||
cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
|
cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
|
||||||
cmGeneratedFileStream& fout) const
|
cmGeneratedFileStream& fout) const
|
||||||
{
|
{
|
||||||
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";
|
|
||||||
|
|
||||||
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
||||||
const std::string makeArgs = mf->GetSafeDefinition(
|
const std::string makeArgs = mf->GetSafeDefinition(
|
||||||
"CMAKE_KATE_MAKE_ARGUMENTS");
|
"CMAKE_KATE_MAKE_ARGUMENTS");
|
||||||
const char* homeOutputDir = mf->GetHomeOutputDirectory();
|
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";
|
||||||
|
|
||||||
|
// 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,
|
this->AppendTarget(fout, "all", make, makeArgs,
|
||||||
homeOutputDir, homeOutputDir);
|
homeOutputDir, homeOutputDir);
|
||||||
this->AppendTarget(fout, "clean", make, makeArgs,
|
this->AppendTarget(fout, "clean", make, makeArgs,
|
||||||
@ -237,7 +247,8 @@ cmExtraKateGenerator::CreateDummyKateProjectFile(const cmMakefile* mf) const
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fout << "#Generated by cmake, do not edit.\n";
|
fout << "#Generated by " << mf->GetRequiredDefinition("CMAKE_COMMAND")
|
||||||
|
<< ", do not edit.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user