[Cmake-commits] CMake branch, next, updated. v2.8.3-846-gb06640c

Brad King brad.king at kitware.com
Mon Dec 13 16:09:33 EST 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  b06640cd9e1295b9af3f3525d955c67645a8e9ff (commit)
       via  a6f25e8835514b620b27425b8e8aa08189e7acbb (commit)
       via  397cfb5665a202c680d6f9b9fc49695e39e626d2 (commit)
      from  f46dc00171ad00593105e0eff0b7ac29220d3064 (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=b06640cd9e1295b9af3f3525d955c67645a8e9ff
commit b06640cd9e1295b9af3f3525d955c67645a8e9ff
Merge: f46dc00 a6f25e8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 13 16:09:31 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 13 16:09:31 2010 -0500

    Merge topic 'dev/add-response-file-support' into next
    
    a6f25e8 Rename response file tests to use "ResponseFile." prefix
    397cfb5 Fix response file load logic


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6f25e8835514b620b27425b8e8aa08189e7acbb
commit a6f25e8835514b620b27425b8e8aa08189e7acbb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 13 16:07:42 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 13 16:07:42 2010 -0500

    Rename response file tests to use "ResponseFile." prefix

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index c390eeb..7805a16 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -713,7 +713,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
 
   ENDIF(NOT COMPILER_IS_COMO)
 
-  ADD_TEST(ResponseFileBasic ${CMAKE_CTEST_COMMAND}
+  ADD_TEST(ResponseFile.Basic ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/ResponseFile"
     "${CMake_BINARY_DIR}/Tests/ResponseFileBasic"
@@ -722,11 +722,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     --build-noclean
     --build-project ResponseFileBasic
     --build-options "@${CMAKE_CURRENT_SOURCE_DIR}/ResponseFile/response-basic")
-  SET_TESTS_PROPERTIES(ResponseFileBasic PROPERTIES
+  SET_TESTS_PROPERTIES(ResponseFile.Basic PROPERTIES
     PASS_REGULAR_EXPRESSION "RESPONSE_VARIABLE is: 'foo'")
   LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ResponseFileBasic")
 
-  ADD_TEST(ResponseFileWithSpaces ${CMAKE_CTEST_COMMAND}
+  ADD_TEST(ResponseFile.WithSpaces ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/ResponseFile"
     "${CMake_BINARY_DIR}/Tests/ResponseFileWithSpaces"
@@ -735,11 +735,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     --build-noclean
     --build-project ResponseFileWithSpaces
     --build-options "@${CMAKE_CURRENT_SOURCE_DIR}/ResponseFile/response-with-spaces")
-  SET_TESTS_PROPERTIES(ResponseFileWithSpaces PROPERTIES
+  SET_TESTS_PROPERTIES(ResponseFile.WithSpaces PROPERTIES
     PASS_REGULAR_EXPRESSION "RESPONSE_VARIABLE is: 'with spaces'")
   LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ResponseFileWithSpaces")
 
-  ADD_TEST(ResponseFileWithBlankLine ${CMAKE_CTEST_COMMAND}
+  ADD_TEST(ResponseFile.WithBlankLine ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/ResponseFile"
     "${CMake_BINARY_DIR}/Tests/ResponseFileWithBlankLine"
@@ -748,11 +748,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     --build-noclean
     --build-project ResponseFileWithBlankLine
     --build-options "@${CMAKE_CURRENT_SOURCE_DIR}/ResponseFile/response-with-blank-line")
-  SET_TESTS_PROPERTIES(ResponseFileWithBlankLine PROPERTIES
+  SET_TESTS_PROPERTIES(ResponseFile.WithBlankLine PROPERTIES
     PASS_REGULAR_EXPRESSION "RESPONSE_VARIABLE is: 'after blank line'")
   LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ResponseFileWithBlankLine")
 
-  ADD_TEST(ResponseFileDuplicate ${CMAKE_CTEST_COMMAND}
+  ADD_TEST(ResponseFile.Duplicate ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/ResponseFile"
     "${CMake_BINARY_DIR}/Tests/ResponseFileDuplicate"
@@ -761,13 +761,13 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     --build-noclean
     --build-project ResponseFileDuplicate
     --build-options "@${CMAKE_CURRENT_SOURCE_DIR}/ResponseFile/response-duplicate")
-  SET_TESTS_PROPERTIES(ResponseFileDuplicate PROPERTIES
+  SET_TESTS_PROPERTIES(ResponseFile.Duplicate PROPERTIES
     PASS_REGULAR_EXPRESSION "RESPONSE_VARIABLE is: 'right'")
-  SET_TESTS_PROPERTIES(ResponseFileDuplicate PROPERTIES
+  SET_TESTS_PROPERTIES(ResponseFile.Duplicate PROPERTIES
     FAIL_REGULAR_EXPRESSION "RESPONSE_VARIABLE is: 'wrong'")
   LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ResponseFileDuplicate")
 
-  ADD_TEST(ResponseFileWithMany ${CMAKE_CTEST_COMMAND}
+  ADD_TEST(ResponseFile.WithMany ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/ResponseFile"
     "${CMake_BINARY_DIR}/Tests/ResponseFileWithMany"
@@ -776,7 +776,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     --build-noclean
     --build-project ResponseFileWithMany
     --build-options "@${CMAKE_CURRENT_SOURCE_DIR}/ResponseFile/response-with-many")
-  SET_TESTS_PROPERTIES(ResponseFileWithMany PROPERTIES
+  SET_TESTS_PROPERTIES(ResponseFile.WithMany PROPERTIES
     PASS_REGULAR_EXPRESSION "RESPONSE_VARIABLE is: 'twentieth'")
   LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ResponseFileWithMany")
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=397cfb5665a202c680d6f9b9fc49695e39e626d2
commit 397cfb5665a202c680d6f9b9fc49695e39e626d2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 13 16:05:12 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 13 16:05:12 2010 -0500

    Fix response file load logic
    
    Skip over the '@' before computing the file name.  If the file cannot be
    opened, report the reason.  Use robust cross-platform GetLineFromStream
    to read lines.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 3bb3d2c..b5afffb 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -185,36 +185,33 @@ void cmSystemTools::ExpandResponseFiles(int ac, char** av,
   args.push_back(av[0]);
   for(int i = 1; i < ac; ++i)
     {
-      if(av[i][0] == '@')
+    if(av[i][0] == '@')
+      {
+      const char* fname = av[i]+1;
+      std::ifstream fin(fname);
+      if(fin)
         {
-        std::string filename = av[i];
-
-        filename = cmSystemTools::CollapseFullPath(filename.c_str());
-        cmSystemTools::ConvertToUnixSlashes(filename);
-        if(cmSystemTools::FileExists(filename.c_str()))
+        std::string line;
+        while(cmSystemTools::GetLineFromStream(fin, line))
           {
-          std::ifstream fin(filename.c_str());
-          size_t offset = i;
-          while (fin)
+          if(!line.empty())
             {
-            std::string next_filearg;
-            std::getline(fin, next_filearg);
-            if (!next_filearg.empty())
-              {
-              args.push_back(next_filearg);
-              }
+            args.push_back(line);
             }
           }
-        else
-          {
-          cmSystemTools::Error("Could not open command line response file ",
-                               filename.c_str());
-          }
         }
       else
         {
-        args.push_back(av[i]);
+        cmOStringStream e;
+        e << "Could not open response file \"" << fname << "\": "
+          << Superclass::GetLastSystemError();
+        cmSystemTools::Error(e.str().c_str());
         }
+      }
+    else
+      {
+      args.push_back(av[i]);
+      }
     }
 
   argc = args.size();

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

Summary of changes:
 Source/cmSystemTools.cxx |   39 ++++++++++++++++++---------------------
 Tests/CMakeLists.txt     |   22 +++++++++++-----------
 2 files changed, 29 insertions(+), 32 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list