[Cmake-commits] CMake branch, next, updated. v2.8.9-227-g04d9fc1

Brad King brad.king at kitware.com
Wed Aug 22 08:38:32 EDT 2012


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  04d9fc1f04b7153bf733076b67e4a852e4ecba5f (commit)
       via  3553001bcc425dfb5d84a2dc8d657fe92c007962 (commit)
      from  8291e8f900d44863ce99f1e4ba002201ab888693 (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=04d9fc1f04b7153bf733076b67e4a852e4ecba5f
commit 04d9fc1f04b7153bf733076b67e4a852e4ecba5f
Merge: 8291e8f 3553001
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 22 08:38:29 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 22 08:38:29 2012 -0400

    Merge topic 'Qt4Macros-fix-resource-parsing' into next
    
    3553001 Qt4Macros: Fix recently broken resource file parsing


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3553001bcc425dfb5d84a2dc8d657fe92c007962
commit 3553001bcc425dfb5d84a2dc8d657fe92c007962
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 22 08:33:12 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Aug 22 08:37:27 2012 -0400

    Qt4Macros: Fix recently broken resource file parsing
    
    Commit 4be67837 (read less from version headers into variables,
    2012-08-19) switched from file(READ) and string(REGEX MATCHALL) to just
    file(STRINGS) to extract the list of resource <file> entries.  However,
    the latter extracts entire lines that match the regex, not just the part
    that matches the regex, so the subsequent string(REGEX REPLACE) fails to
    match and replace anything.  Return to the original parsing logic but
    replace file(READ) with file(STRINGS) to load a minimal part of the file
    before using string(REGEX MATCHALL) as before.

diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 95a2176..6cf16fd 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -187,15 +187,17 @@ macro (QT4_ADD_RESOURCES outfiles )
     if(EXISTS "${infile}")
       #  parse file for dependencies
       #  all files are absolute paths or relative to the location of the qrc file
-      file(STRINGS "${infile}" _RC_FILES REGEX "<file[^>]*>[^<]+")
-      foreach(_RC_FILE IN LISTS _RC_FILES)
-        string(REGEX REPLACE "^<file[^>]*>([^<]*)" "\\1" _RC_FILE "${_RC_FILE}")
+      file(STRINGS "${infile}" _RC_FILE_CONTENTS REGEX "<file[^>]*>[^<]+")
+      string(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+      foreach(_RC_FILE ${_RC_FILES})
+        string(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
         if(NOT IS_ABSOLUTE "${_RC_FILE}")
           set(_RC_FILE "${rc_path}/${_RC_FILE}")
         endif()
         set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
       endforeach()
       unset(_RC_FILES)
+      unset(_RC_FILE_CONTENTS)
       # Since this cmake macro is doing the dependency scanning for these files,
       # let's make a configured file and add it as a dependency so cmake is run
       # again when dependencies need to be recomputed.

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

Summary of changes:
 Modules/Qt4Macros.cmake |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list