mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 10:39:28 -05:00
Ninja: Use ccmake for edit_cache
If `ninja` is new enough to support the console pool, and `ccmake` is available, use it for `edit_cache`.
This commit is contained in:
committed by
Brad King
parent
7cb4ad7e39
commit
51bf4094fb
@@ -0,0 +1,5 @@
|
|||||||
|
ninja-edit_cache
|
||||||
|
----------------
|
||||||
|
|
||||||
|
* The :ref:`Ninja Generators` now implement the ``edit_cache`` target
|
||||||
|
using :manual:`ccmake(1)` if available.
|
||||||
@@ -110,7 +110,7 @@ std::string cmGlobalCommonGenerator::GetEditCacheCommand() const
|
|||||||
std::string editCacheCommand = cm->GetCMakeEditCommand();
|
std::string editCacheCommand = cm->GetCMakeEditCommand();
|
||||||
if (!cm->GetCacheDefinition("CMAKE_EDIT_COMMAND") ||
|
if (!cm->GetCacheDefinition("CMAKE_EDIT_COMMAND") ||
|
||||||
!editCacheCommand.empty()) {
|
!editCacheCommand.empty()) {
|
||||||
if (editCacheCommand.empty()) {
|
if (this->SupportsDirectConsole() && editCacheCommand.empty()) {
|
||||||
editCacheCommand = cmSystemTools::GetCMakeCursesCommand();
|
editCacheCommand = cmSystemTools::GetCMakeCursesCommand();
|
||||||
}
|
}
|
||||||
if (editCacheCommand.empty()) {
|
if (editCacheCommand.empty()) {
|
||||||
|
|||||||
@@ -1019,13 +1019,6 @@ bool cmGlobalNinjaGenerator::HasRule(const std::string& name)
|
|||||||
|
|
||||||
// Private virtual overrides
|
// Private virtual overrides
|
||||||
|
|
||||||
std::string cmGlobalNinjaGenerator::GetEditCacheCommand() const
|
|
||||||
{
|
|
||||||
// Ninja by design does not run interactive tools in the terminal,
|
|
||||||
// so our only choice is cmake-gui.
|
|
||||||
return cmSystemTools::GetCMakeGUICommand();
|
|
||||||
}
|
|
||||||
|
|
||||||
void cmGlobalNinjaGenerator::ComputeTargetObjectDirectory(
|
void cmGlobalNinjaGenerator::ComputeTargetObjectDirectory(
|
||||||
cmGeneratorTarget* gt) const
|
cmGeneratorTarget* gt) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -488,7 +488,6 @@ protected:
|
|||||||
std::string DefaultFileConfig;
|
std::string DefaultFileConfig;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string GetEditCacheCommand() const override;
|
|
||||||
bool FindMakeProgram(cmMakefile* mf) override;
|
bool FindMakeProgram(cmMakefile* mf) override;
|
||||||
void CheckNinjaFeatures();
|
void CheckNinjaFeatures();
|
||||||
void CheckNinjaCodePage();
|
void CheckNinjaCodePage();
|
||||||
|
|||||||
Reference in New Issue
Block a user