[Cmake-commits] CMake branch, next, updated. v2.8.2-761-gf341f65

Brad King brad.king at kitware.com
Mon Sep 13 08:09:13 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  f341f65b0de9edeb0594948e26b5fcb6d91ca91a (commit)
       via  9d21281b7d4c1cec9071489a8f0a6fe19fb7ad2c (commit)
       via  86025d3a38fb2dd6409e713b4633bf782975d5c3 (commit)
      from  24ecd4cfde77b2fa600022b3bdad0f41a1ba6bd5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f341f65b0de9edeb0594948e26b5fcb6d91ca91a
commit f341f65b0de9edeb0594948e26b5fcb6d91ca91a
Merge: 24ecd4c 9d21281
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 13 08:09:09 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 13 08:09:09 2010 -0400

    Merge topic 'style-line-length' into next
    
    9d21281 Fix line-too-long style errors
    86025d3 file(DOWNLOAD): Fix error message formatting


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d21281b7d4c1cec9071489a8f0a6fe19fb7ad2c
commit 9d21281b7d4c1cec9071489a8f0a6fe19fb7ad2c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 10 14:42:09 2010 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 10 14:42:09 2010 -0400

    Fix line-too-long style errors

diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index c198727..1158fc0 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -687,7 +687,8 @@ cmELFInternalImpl<Types>::GetDynamicSectionString(int tag)
       // The value has been read successfully.  Report it.
       se.Position = static_cast<unsigned long>(strtab.sh_offset + first);
       se.Size = last - first;
-      se.IndexInSection = static_cast<int>(di - this->DynamicSectionEntries.begin());
+      se.IndexInSection =
+        static_cast<int>(di - this->DynamicSectionEntries.begin());
       return &se;
       }
     }
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index c5c9d5c..7c65c32 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -260,8 +260,8 @@ cmGlobalVisualStudio8Generator
   for(std::vector<std::string>::iterator i = this->Configurations.begin();
       i != this->Configurations.end(); ++i)
     {
-    fout << "\t\t" << *i << "|" << this->GetPlatformName() << " = " << *i << "|"
-         << this->GetPlatformName() << "\n";
+    fout << "\t\t" << *i << "|" << this->GetPlatformName()
+         << " = "  << *i << "|" << this->GetPlatformName() << "\n";
     }
   fout << "\tEndGlobalSection\n";
 }
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 539816d..01fcafd 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1304,7 +1304,8 @@ void cmLocalVisualStudio6Generator
                              optionsRelease);
     this->ComputeLinkOptions(target, "MinSizeRel", extraLinkOptionsMinSizeRel,
                              optionsMinSizeRel);
-    this->ComputeLinkOptions(target, "RelWithDebInfo", extraLinkOptionsRelWithDebInfo,
+    this->ComputeLinkOptions(target, "RelWithDebInfo",
+                             extraLinkOptionsRelWithDebInfo,
                              optionsRelWithDebInfo);
     }
 
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 8378922..069db7e 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1176,7 +1176,8 @@ bool cmSystemTools::ComputeFileMD5(const char* source, char* md5out)
   // Should be efficient enough on most system:
   const int bufferSize = 4096;
   char buffer[bufferSize];
-  unsigned char const* buffer_uc = reinterpret_cast<unsigned char const*>(buffer);
+  unsigned char const* buffer_uc =
+    reinterpret_cast<unsigned char const*>(buffer);
   // This copy loop is very sensitive on certain platforms with
   // slightly broken stream libraries (like HPUX).  Normally, it is
   // incorrect to not check the error condition on the fin.read()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86025d3a38fb2dd6409e713b4633bf782975d5c3
commit 86025d3a38fb2dd6409e713b4633bf782975d5c3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 10 14:35:07 2010 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 10 14:35:07 2010 -0400

    file(DOWNLOAD): Fix error message formatting
    
    The SetError method automatically starts the message with the name of
    the command.  Fix up calls to it so that we get "file DOWNLOAD..."
    instead of "file FILE(DOWNLOAD ...".  Also reduce length of long lines
    containing these calls.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 133c1a1..8ebd41f 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2571,8 +2571,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
   std::vector<std::string>::const_iterator i = args.begin();
   if(args.size() < 3)
     {
-    this->SetError("FILE(DOWNLOAD url file) must be called with "
-                   "at least three arguments.");
+    this->SetError("DOWNLOAD must be called with at least three arguments.");
     return false;
     }
   ++i; // Get rid of subcommand
@@ -2598,8 +2597,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
         }
       else
         {
-        this->SetError("FILE(DOWNLOAD url file TIMEOUT time) missing "
-                       "time for TIMEOUT.");
+        this->SetError("DOWNLOAD missing time for TIMEOUT.");
         return false;
         }
       }
@@ -2608,8 +2606,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
       ++i;
       if( i == args.end())
         {
-        this->SetError("FILE(DOWNLOAD url file LOG VAR) missing "
-                       "VAR for LOG.");
+        this->SetError("DOWNLOAD missing VAR for LOG.");
         return false;
         }
       verboseLog = *i;
@@ -2619,8 +2616,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
       ++i;
       if( i == args.end())
         {
-        this->SetError("FILE(DOWNLOAD url file STATUS VAR) missing "
-                       "VAR for STATUS.");
+        this->SetError("DOWNLOAD missing VAR for STATUS.");
         return false;
         }
       statusVar = *i;
@@ -2630,8 +2626,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
       ++i;
       if( i == args.end())
         {
-        this->SetError("FILE(DOWNLOAD url file EXPECTED_MD5 sum) missing "
-                       "sum value for EXPECTED_MD5.");
+        this->SetError("DOWNLOAD missing sum value for EXPECTED_MD5.");
         return false;
         }
       expectedMD5sum = cmSystemTools::LowerCase(*i);
@@ -2654,8 +2649,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
 
     if (!cmSystemTools::ComputeFileMD5(file.c_str(), computedMD5))
       {
-      this->SetError("FILE(DOWNLOAD ) error; cannot compute MD5 sum on "
-        "pre-existing file");
+      this->SetError("DOWNLOAD cannot compute MD5 sum on pre-existing file");
       return false;
       }
 
@@ -2665,7 +2659,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
     if (expectedMD5sum == actualMD5sum)
       {
       this->Makefile->DisplayStatus(
-        "FILE(DOWNLOAD ) returning early: file already exists with "
+        "FILE(DOWNLOAD) returning early: file already exists with "
         "expected MD5 sum", -1);
 
       if(statusVar.size())
@@ -2698,8 +2692,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
   std::ofstream fout(file.c_str(), std::ios::binary);
   if(!fout)
     {
-    this->SetError("FILE(DOWNLOAD url file TIMEOUT time) can not open "
-                       "file for write.");
+    this->SetError("DOWNLOAD cannot open file for write.");
     return false;
     }
 
@@ -2708,8 +2701,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
   curl = ::curl_easy_init();
   if(!curl)
     {
-    this->SetError("FILE(DOWNLOAD ) error "
-                   "initializing curl.");
+    this->SetError("DOWNLOAD error initializing curl.");
     return false;
     }
 
@@ -2718,9 +2710,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
   ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
   if (res != CURLE_OK)
     {
-    std::string errstring = "FILE(DOWNLOAD ) error; cannot set url: ";
-    errstring += ::curl_easy_strerror(res);
-    this->SetError(errstring.c_str());
+    std::string e = "DOWNLOAD cannot set url: ";
+    e += ::curl_easy_strerror(res);
+    this->SetError(e.c_str());
     return false;
     }
 
@@ -2728,10 +2720,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
                            cmFileCommandWriteMemoryCallback);
   if (res != CURLE_OK)
     {
-    std::string errstring =
-      "FILE(DOWNLOAD ) error; cannot set write function: ";
-    errstring += ::curl_easy_strerror(res);
-    this->SetError(errstring.c_str());
+    std::string e = "DOWNLOAD cannot set write function: ";
+    e += ::curl_easy_strerror(res);
+    this->SetError(e.c_str());
     return false;
     }
 
@@ -2739,10 +2730,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
                            cmFileCommandCurlDebugCallback);
   if (res != CURLE_OK)
     {
-    std::string errstring =
-      "FILE(DOWNLOAD ) error; cannot set debug function: ";
-    errstring += ::curl_easy_strerror(res);
-    this->SetError(errstring.c_str());
+    std::string e = "DOWNLOAD cannot set debug function: ";
+    e += ::curl_easy_strerror(res);
+    this->SetError(e.c_str());
     return false;
     }
 
@@ -2752,27 +2742,27 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
 
   if (res != CURLE_OK)
     {
-    std::string errstring = "FILE(DOWNLOAD ) error; cannot set write data: ";
-    errstring += ::curl_easy_strerror(res);
-    this->SetError(errstring.c_str());
+    std::string e = "DOWNLOAD cannot set write data: ";
+    e += ::curl_easy_strerror(res);
+    this->SetError(e.c_str());
     return false;
     }
 
   res = ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug);
   if (res != CURLE_OK)
     {
-    std::string errstring = "FILE(DOWNLOAD ) error; cannot set debug data: ";
-    errstring += ::curl_easy_strerror(res);
-    this->SetError(errstring.c_str());
+    std::string e = "DOWNLOAD cannot set debug data: ";
+    e += ::curl_easy_strerror(res);
+    this->SetError(e.c_str());
     return false;
     }
 
   res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
   if (res != CURLE_OK)
     {
-    std::string errstring = "FILE(DOWNLOAD ) error; cannot set follow-redirect option: ";
-    errstring += ::curl_easy_strerror(res);
-    this->SetError(errstring.c_str());
+    std::string e = "DOWNLOAD cannot set follow-redirect option: ";
+    e += ::curl_easy_strerror(res);
+    this->SetError(e.c_str());
     return false;
     }
 
@@ -2782,9 +2772,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
 
     if (res != CURLE_OK)
       {
-      std::string errstring = "FILE(DOWNLOAD ) error; cannot set verbose: ";
-      errstring += ::curl_easy_strerror(res);
-      this->SetError(errstring.c_str());
+      std::string e = "DOWNLOAD cannot set verbose: ";
+      e += ::curl_easy_strerror(res);
+      this->SetError(e.c_str());
       return false;
       }
     }
@@ -2795,9 +2785,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
 
     if (res != CURLE_OK)
       {
-      std::string errstring = "FILE(DOWNLOAD ) error; cannot set timeout: ";
-      errstring += ::curl_easy_strerror(res);
-      this->SetError(errstring.c_str());
+      std::string e = "DOWNLOAD cannot set timeout: ";
+      e += ::curl_easy_strerror(res);
+      this->SetError(e.c_str());
       return false;
       }
     }
@@ -2815,9 +2805,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
       CURLOPT_NOPROGRESS, 0);
     if (res != CURLE_OK)
       {
-      std::string errstring = "FILE(DOWNLOAD ) error; cannot set noprogress value: ";
-      errstring += ::curl_easy_strerror(res);
-      this->SetError(errstring.c_str());
+      std::string e = "DOWNLOAD cannot set noprogress value: ";
+      e += ::curl_easy_strerror(res);
+      this->SetError(e.c_str());
       return false;
       }
 
@@ -2825,9 +2815,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
       CURLOPT_PROGRESSFUNCTION, cmFileCommandCurlProgressCallback);
     if (res != CURLE_OK)
       {
-      std::string errstring = "FILE(DOWNLOAD ) error; cannot set progress function: ";
-      errstring += ::curl_easy_strerror(res);
-      this->SetError(errstring.c_str());
+      std::string e = "DOWNLOAD cannot set progress function: ";
+      e += ::curl_easy_strerror(res);
+      this->SetError(e.c_str());
       return false;
       }
 
@@ -2835,9 +2825,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
       CURLOPT_PROGRESSDATA, reinterpret_cast<void*>(&helper));
     if (res != CURLE_OK)
       {
-      std::string errstring = "FILE(DOWNLOAD ) error; cannot set progress data: ";
-      errstring += ::curl_easy_strerror(res);
-      this->SetError(errstring.c_str());
+      std::string e = "DOWNLOAD cannot set progress data: ";
+      e += ::curl_easy_strerror(res);
+      this->SetError(e.c_str());
       return false;
       }
     }
@@ -2871,8 +2861,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
 
     if (!cmSystemTools::ComputeFileMD5(file.c_str(), computedMD5))
       {
-      this->SetError("FILE(DOWNLOAD ) error; cannot compute MD5 sum on "
-        "downloaded file");
+      this->SetError("DOWNLOAD cannot compute MD5 sum on downloaded file");
       return false;
       }
 
@@ -2882,8 +2871,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
     if (expectedMD5sum != actualMD5sum)
       {
       cmOStringStream oss;
-      oss << "FILE(DOWNLOAD ) error; expected and actual MD5 sums differ"
-        << std::endl
+      oss << "DOWNLOAD MD5 mismatch" << std::endl
         << "  for file: [" << file << "]" << std::endl
         << "    expected MD5 sum: [" << expectedMD5sum << "]" << std::endl
         << "      actual MD5 sum: [" << actualMD5sum << "]" << std::endl
@@ -2913,8 +2901,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
 
   return true;
 #else
-  this->SetError("FILE(DOWNLOAD ) "
-                 "not supported in bootstrap cmake ");
+  this->SetError("DOWNLOAD not supported by bootstrap cmake.");
   return false;
 #endif
 }

-----------------------------------------------------------------------

Summary of changes:
 Source/cmELF.cxx                          |    3 +-
 Source/cmFileCommand.cxx                  |  103 +++++++++++++----------------
 Source/cmGlobalVisualStudio8Generator.cxx |    4 +-
 Source/cmLocalVisualStudio6Generator.cxx  |    3 +-
 Source/cmSystemTools.cxx                  |    3 +-
 5 files changed, 53 insertions(+), 63 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list