diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2021-06-26 21:45:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-29 15:07:14 (GMT) |
commit | 7cb4ad7e3990c879088b7573d136509989ed3f5b (patch) | |
tree | a3cc9052669cd23ef851b42664f8e7e306616bef /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | 23af78bb78b924b52b180049eb2ce62a4339251e (diff) | |
download | CMake-7cb4ad7e3990c879088b7573d136509989ed3f5b.zip CMake-7cb4ad7e3990c879088b7573d136509989ed3f5b.tar.gz CMake-7cb4ad7e3990c879088b7573d136509989ed3f5b.tar.bz2 |
cmGlobalCommonGenerator: Adopt GetEditCacheCommand
Move the implementation from the Makefile generator so it can be
later used by the Ninja generator too.
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 9c3de1e..d9f94a1 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -78,36 +78,6 @@ void cmGlobalUnixMakefileGenerator3::GetDocumentation( entry.Brief = "Generates standard UNIX makefiles."; } -std::string cmGlobalUnixMakefileGenerator3::GetEditCacheCommand() const -{ - // If generating for an extra IDE, the edit_cache target cannot - // launch a terminal-interactive tool, so always use cmake-gui. - if (!this->GetExtraGeneratorName().empty()) { - return cmSystemTools::GetCMakeGUICommand(); - } - - // Use an internal cache entry to track the latest dialog used - // to edit the cache, and use that for the edit_cache target. - cmake* cm = this->GetCMakeInstance(); - std::string editCacheCommand = cm->GetCMakeEditCommand(); - if (!cm->GetCacheDefinition("CMAKE_EDIT_COMMAND") || - !editCacheCommand.empty()) { - if (editCacheCommand.empty()) { - editCacheCommand = cmSystemTools::GetCMakeCursesCommand(); - } - if (editCacheCommand.empty()) { - editCacheCommand = cmSystemTools::GetCMakeGUICommand(); - } - if (!editCacheCommand.empty()) { - cm->AddCacheEntry("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(), - "Path to cache edit program executable.", - cmStateEnums::INTERNAL); - } - } - cmProp edit_cmd = cm->GetCacheDefinition("CMAKE_EDIT_COMMAND"); - return edit_cmd ? *edit_cmd : std::string(); -} - void cmGlobalUnixMakefileGenerator3::ComputeTargetObjectDirectory( cmGeneratorTarget* gt) const { |