summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-12 13:44:08 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-12 13:47:19 (GMT)
commit684063c0363687285126f30a517239aa2ad46149 (patch)
treec7bb4a0540da44dc14d1b8ab5de4b0102d925dd2 /Source/cmake.cxx
parenteaf5b7a776e24af55f6f7f254171c3e2d2932d9b (diff)
downloadCMake-684063c0363687285126f30a517239aa2ad46149.zip
CMake-684063c0363687285126f30a517239aa2ad46149.tar.gz
CMake-684063c0363687285126f30a517239aa2ad46149.tar.bz2
Refactor tool selection for edit_cache (#14544)
Refactor edit_cache tool selection to ask each global generator for its preference. Teach the Ninja generator to always use cmake-gui because Ninja by design cannot run interactive terminal dialogs like ccmake. Teach the Makefile generator to use cmake-gui when also using an "extra" generator whose IDE has no terminal to run ccmake, and otherwise fall back to CMAKE_EDIT_COMMAND selection for normal Makefile build systems.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx32
1 files changed, 0 insertions, 32 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 8bde300..f0f9ef7 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -944,38 +944,6 @@ int cmake::AddCMakePaths()
("CMAKE_CPACK_COMMAND", cmSystemTools::GetCPackCommand().c_str(),
"Path to cpack program executable.", cmCacheManager::INTERNAL);
#endif
- // if the edit command is not yet in the cache,
- // or if CMakeEditCommand has been set on this object,
- // then set the CMAKE_EDIT_COMMAND in the cache
- // This will mean that the last gui to edit the cache
- // will be the one that make edit_cache uses.
- if(!this->GetCacheDefinition("CMAKE_EDIT_COMMAND")
- || !this->CMakeEditCommand.empty())
- {
- // Find and save the command to edit the cache
- std::string editCacheCommand;
- if(!this->CMakeEditCommand.empty())
- {
- editCacheCommand = this->CMakeEditCommand;
- }
- if(!cmSystemTools::FileExists(editCacheCommand.c_str()) &&
- !cmSystemTools::GetCMakeCursesCommand().empty())
- {
- editCacheCommand = cmSystemTools::GetCMakeCursesCommand();
- }
- if(!cmSystemTools::FileExists(editCacheCommand.c_str()) &&
- !cmSystemTools::GetCMakeGUICommand().empty())
- {
- editCacheCommand = cmSystemTools::GetCMakeGUICommand();
- }
- if(cmSystemTools::FileExists(editCacheCommand.c_str()))
- {
- this->CacheManager->AddCacheEntry
- ("CMAKE_EDIT_COMMAND", editCacheCommand.c_str(),
- "Path to cache edit program executable.", cmCacheManager::INTERNAL);
- }
- }
-
if(!cmSystemTools::FileExists(
(cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake").c_str()))
{