Răsfoiți Sursa

STYLE: fix line lengths and add "remove -f" to the docs

Alex
Alexander Neundorf 18 ani în urmă
părinte
comite
a4429ad30a
3 a modificat fișierele cu 30 adăugiri și 25 ștergeri
  1. 2 1
      Source/cmLocalGenerator.cxx
  2. 23 21
      Source/cmake.cxx
  3. 5 3
      Source/cmakemain.cxx

+ 2 - 1
Source/cmLocalGenerator.cxx

@@ -65,7 +65,8 @@ cmLocalGenerator::~cmLocalGenerator()
 
 void cmLocalGenerator::Configure()
 {
-  cmLocalGenerator* previousLg = this->GetGlobalGenerator()->GetCurrentLocalGenerator();
+  cmLocalGenerator* previousLg = 
+                        this->GetGlobalGenerator()->GetCurrentLocalGenerator();
   this->GetGlobalGenerator()->SetCurrentLocalGenerator(this);
 
   // make sure the CMakeFiles dir is there

+ 23 - 21
Source/cmake.cxx

@@ -852,30 +852,32 @@ void CMakeCommandUsage(const char* program)
   errorStream
     << "Usage: " << program << " -E [command] [arguments ...]\n"
     << "Available commands: \n"
-    << "  chdir dir cmd [args]... - run command in a given directory\n"
-    << "  copy file destination   - copy file to destination (either file or "
-    "directory)\n"
-    << "  copy_if_different in-file out-file   - copy file if input has "
-    "changed\n"
-    << "  copy_directory source destination    - copy directory 'source' "
-    "content to directory 'destination'\n"
+    << "  chdir dir cmd [args]...   - run command in a given directory\n"
+    << "  copy file destination     - copy file to destination (either file "
+       "or directory)\n"
+    << "  copy_if_different in-file out-file  - copy file if input has "
+       "changed\n"
+    << "  copy_directory source destination   - copy directory 'source' "
+       "content to directory 'destination'\n"
     << "  compare_files file1 file2 - check if file1 is same as file2\n"
-    << "  echo [string]...        - displays arguments as text\n"
-    << "  echo_append [string]... - displays arguments as text but no new"
-    " line\n"
-    << "  environment             - display the current enviroment\n"
-    << "  make_directory dir      - create a directory\n"
-    << "  md5sum file1 [...]      - compute md5sum of files\n"
-    << "  remove_directory dir    - remove a directory and its contents\n"
-    << "  remove file1 file2 ...  - remove the file(s)\n"
-    << "  tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar.\n"
-    << "  time command [args] ... - run command and return elapsed time\n"
+    << "  echo [string]...          - displays arguments as text\n"
+    << "  echo_append [string]...   - displays arguments as text but no new "
+       "line\n"
+    << "  environment               - display the current enviroment\n"
+    << "  make_directory dir        - create a directory\n"
+    << "  md5sum file1 [...]        - compute md5sum of files\n"
+    << "  remove_directory dir      - remove a directory and its contents\n"
+    << "  remove [-f] file1 file2 ... - remove the file(s), use -f to force "
+       "it\n"
+    << "  tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar "
+       "archive\n"
+    << "  time command [args] ...   - run command and return elapsed time\n"
 #if defined(_WIN32) && !defined(__CYGWIN__)
-    << "  write_regv key value    - write registry value\n"
-    << "  delete_regv key         - delete registry value\n"
-    << "  comspec                 - on windows 9x use this for RunCommand\n"
+    << "  write_regv key value      - write registry value\n"
+    << "  delete_regv key           - delete registry value\n"
+    << "  comspec                   - on windows 9x use this for RunCommand\n"
 #else
-    << "  create_symlink old new  - create a symbolic link new -> old\n"
+    << "  create_symlink old new    - create a symbolic link new -> old\n"
 #endif
     ;
 

+ 5 - 3
Source/cmakemain.cxx

@@ -211,12 +211,14 @@ static std::string cmakemainGetStack(void *clientdata)
   return msg;
 }
 
-static void cmakemainErrorCallback(const char* m, const char* title, bool& nomore, void *clientdata)
+static void cmakemainErrorCallback(const char* m, const char* title, 
+                                   bool& nomore, void *clientdata)
 {
   std::cerr << m << cmakemainGetStack(clientdata) << std::endl << std::flush;
 }
 
-static void cmakemainProgressCallback(const char *m, float prog, void* clientdata)
+static void cmakemainProgressCallback(const char *m, float prog, 
+                                      void* clientdata)
 {
   cmMakefile* mf = cmakemainGetMakefile(clientdata);
   std::string dir;
@@ -233,7 +235,7 @@ static void cmakemainProgressCallback(const char *m, float prog, void* clientdat
 
   if ((prog < 0) || (!dir.empty()))
     {
-    std::cout << "-- " << m << dir << cmakemainGetStack(clientdata) << std::endl;
+    std::cout << "-- " << m << dir << cmakemainGetStack(clientdata)<<std::endl;
     }
 
   std::cout.flush();