MCPcopy Create free account
hub / github.com/Kitware/CMake / GetEditCacheCommand

Method GetEditCacheCommand

Source/cmGlobalCommonGenerator.cxx:102–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102std::string cmGlobalCommonGenerator::GetEditCacheCommand() const
103{
104 // If generating for an extra IDE, the edit_cache target cannot
105 // launch a terminal-interactive tool, so always use cmake-gui.
106 if (!this->GetExtraGeneratorName().empty()) {
107 return cmSystemTools::GetCMakeGUICommand();
108 }
109
110 // Use an internal cache entry to track the latest dialog used
111 // to edit the cache, and use that for the edit_cache target.
112 cmake* cm = this->GetCMakeInstance();
113 std::string editCacheCommand = cm->GetCMakeEditCommand();
114 if (!cm->GetCacheDefinition("CMAKE_EDIT_COMMAND") ||
115 !editCacheCommand.empty()) {
116 if (this->SupportsDirectConsole() && editCacheCommand.empty()) {
117 editCacheCommand = cmSystemTools::GetCMakeCursesCommand();
118 }
119 if (editCacheCommand.empty()) {
120 editCacheCommand = cmSystemTools::GetCMakeGUICommand();
121 }
122 if (!editCacheCommand.empty()) {
123 cm->AddCacheEntry("CMAKE_EDIT_COMMAND", editCacheCommand,
124 "Path to cache edit program executable.",
125 cmStateEnums::INTERNAL);
126 }
127 }
128 cmValue edit_cmd = cm->GetCacheDefinition("CMAKE_EDIT_COMMAND");
129 return edit_cmd ? *edit_cmd : std::string();
130}
131
132void cmGlobalCommonGenerator::RemoveUnknownClangTidyExportFixesFiles() const
133{

Callers 2

CreateIfAnyMethod · 0.45
ConfigureMethod · 0.45

Calls 6

SupportsDirectConsoleMethod · 0.95
GetExtraGeneratorNameMethod · 0.80
GetCacheDefinitionMethod · 0.80
emptyMethod · 0.45
GetCMakeInstanceMethod · 0.45
AddCacheEntryMethod · 0.45

Tested by

no test coverage detected