[Cmake-commits] [cmake-commits] hoffman committed CMakeSetup.cxx 1.19 1.20

cmake-commits at cmake.org cmake-commits at cmake.org
Sat Feb 21 14:23:34 EST 2009


Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv32674

Modified Files:
	CMakeSetup.cxx 
Log Message:
BUG: make sure an x server is not required for the build


Index: CMakeSetup.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetup.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -C 2 -d -r1.19 -r1.20
*** CMakeSetup.cxx	4 Apr 2008 20:02:50 -0000	1.19
--- CMakeSetup.cxx	21 Feb 2009 19:23:32 -0000	1.20
***************
*** 68,71 ****
--- 68,107 ----
  {
    cmSystemTools::FindExecutableDirectory(argv[0]);
+   // check docs first so that X is not need to get docs
+   // do docs, if args were given
+   cmDocumentation doc;
+   if(doc.CheckOptions(argc, argv))
+     {
+     // Construct and print requested documentation.
+     cmake hcm;
+     hcm.AddCMakePaths();
+     // just incase the install is bad avoid a seg fault
+     const char* root = hcm.GetCacheDefinition("CMAKE_ROOT");
+     if(root)
+       {
+       doc.SetCMakeRoot(root);
+       }
+     std::vector<cmDocumentationEntry> commands;
+     std::vector<cmDocumentationEntry> compatCommands;
+     std::map<std::string,cmDocumentationSection *> propDocs;
+ 
+     std::vector<cmDocumentationEntry> generators;
+     hcm.GetCommandDocumentation(commands, true, false);
+     hcm.GetCommandDocumentation(compatCommands, false, true);
+     hcm.GetGeneratorDocumentation(generators);
+     hcm.GetPropertiesDocumentation(propDocs);
+     doc.SetName("cmake");
+     doc.SetSection("Name",cmDocumentationName);
+     doc.SetSection("Usage",cmDocumentationUsage);
+     doc.SetSection("Description",cmDocumentationDescription);
+     doc.AppendSection("Generators",generators);
+     doc.PrependSection("Options",cmDocumentationOptions);
+     doc.SetSection("Commands",commands);
+     doc.SetSection("Compatilbility Commands", compatCommands);
+     doc.SetSections(propDocs);
+ 
+     return (doc.PrintRequestedDocumentation(std::cout)? 0:1);
+     }
+ 
    QApplication app(argc, argv);
    
***************
*** 107,146 ****
    app.setWindowIcon(QIcon(":/Icons/CMakeSetup.png"));
    
-   // do docs, if args were given
-   cmDocumentation doc;
-   if(app.arguments().size() > 1 &&
-      doc.CheckOptions(app.argc(), app.argv()))
-     {
-     // Construct and print requested documentation.
-     cmake hcm;
-     hcm.AddCMakePaths();
-     // just incase the install is bad avoid a seg fault
-     const char* root = hcm.GetCacheDefinition("CMAKE_ROOT");
-     if(root)
-       {
-       doc.SetCMakeRoot(root);
-       }
-     std::vector<cmDocumentationEntry> commands;
-     std::vector<cmDocumentationEntry> compatCommands;
-     std::map<std::string,cmDocumentationSection *> propDocs;
- 
-     std::vector<cmDocumentationEntry> generators;
-     hcm.GetCommandDocumentation(commands, true, false);
-     hcm.GetCommandDocumentation(compatCommands, false, true);
-     hcm.GetGeneratorDocumentation(generators);
-     hcm.GetPropertiesDocumentation(propDocs);
-     doc.SetName("cmake");
-     doc.SetSection("Name",cmDocumentationName);
-     doc.SetSection("Usage",cmDocumentationUsage);
-     doc.SetSection("Description",cmDocumentationDescription);
-     doc.AppendSection("Generators",generators);
-     doc.PrependSection("Options",cmDocumentationOptions);
-     doc.SetSection("Commands",commands);
-     doc.SetSection("Compatilbility Commands", compatCommands);
-     doc.SetSections(propDocs);
- 
-     return (doc.PrintRequestedDocumentation(std::cout)? 0:1);
-     }
- 
    CMakeSetupDialog dialog;
    QString title = QString("CMake %1");
--- 143,146 ----



More information about the Cmake-commits mailing list