mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06: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
5
Help/release/dev/ninja-edit_cache.rst
Normal file
5
Help/release/dev/ninja-edit_cache.rst
Normal file
@@ -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();
|
||||
if (!cm->GetCacheDefinition("CMAKE_EDIT_COMMAND") ||
|
||||
!editCacheCommand.empty()) {
|
||||
if (editCacheCommand.empty()) {
|
||||
if (this->SupportsDirectConsole() && editCacheCommand.empty()) {
|
||||
editCacheCommand = cmSystemTools::GetCMakeCursesCommand();
|
||||
}
|
||||
if (editCacheCommand.empty()) {
|
||||
|
||||
@@ -1019,13 +1019,6 @@ bool cmGlobalNinjaGenerator::HasRule(const std::string& name)
|
||||
|
||||
// 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(
|
||||
cmGeneratorTarget* gt) const
|
||||
{
|
||||
|
||||
@@ -488,7 +488,6 @@ protected:
|
||||
std::string DefaultFileConfig;
|
||||
|
||||
private:
|
||||
std::string GetEditCacheCommand() const override;
|
||||
bool FindMakeProgram(cmMakefile* mf) override;
|
||||
void CheckNinjaFeatures();
|
||||
void CheckNinjaCodePage();
|
||||
|
||||
Reference in New Issue
Block a user