ENH: Centralized and globalized computation of CMake program locations. This eliminates startup paths that failed to produce this information.

This commit is contained in:
Brad King
2007-12-13 17:56:50 -05:00
parent ebc036bbda
commit 9f61e2a235
15 changed files with 68 additions and 110 deletions

View File

@@ -7,6 +7,7 @@
#include "CMakeCommandLineInfo.h"
#include "../cmDocumentation.h"
#include "../cmake.h"
#include "../cmSystemTools.h"
//----------------------------------------------------------------------------
@@ -101,6 +102,7 @@ BOOL CMakeSetup::InitInstance()
#endif
CMakeCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
cmSystemTools::FindExecutableDirectory(cmdInfo.GetArgV()[0]);
// Check for documentation options. If there are no arguments skip
// the check because the GUI should be displayed instead of showing
@@ -111,7 +113,7 @@ BOOL CMakeSetup::InitInstance()
{
// Construct and print requested documentation.
cmake hcm;
hcm.AddCMakePaths(cmdInfo.GetArgV()[0]);
hcm.AddCMakePaths();
doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT"));
std::vector<cmDocumentationEntry> commands;
std::vector<cmDocumentationEntry> compatCommands;