| 100 | } |
| 101 | |
| 102 | std::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 | |
| 132 | void cmGlobalCommonGenerator::RemoveUnknownClangTidyExportFixesFiles() const |
| 133 | { |
no test coverage detected