[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-1162-g2986208

Brad King brad.king at kitware.com
Wed Oct 28 09:08:43 EDT 2015


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  2986208551bbd84b7dfe8fa28955b334f2faced8 (commit)
       via  e78fcc6329483c99e61cebffbe5d82b67a3361ae (commit)
      from  ffc3bed3929bb91079c86e40f62194f54872c1c6 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2986208551bbd84b7dfe8fa28955b334f2faced8
commit 2986208551bbd84b7dfe8fa28955b334f2faced8
Merge: ffc3bed e78fcc6
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 28 09:08:42 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 28 09:08:42 2015 -0400

    Merge topic 'autorcc-qt-5.1-compat' into next
    
    e78fcc63 QtAutogen: Fix rcc invocation for Qt 5.0 and 5.1 (#15644)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e78fcc6329483c99e61cebffbe5d82b67a3361ae
commit e78fcc6329483c99e61cebffbe5d82b67a3361ae
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 28 09:00:51 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 28 09:03:10 2015 -0400

    QtAutogen: Fix rcc invocation for Qt 5.0 and 5.1 (#15644)
    
    In commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files if their
    input changes, 2014-09-17) we added use of the rcc `--list` option.
    Prior to Qt 5.2 this option was called just `-list`.  Run `rcc --help`
    to check for support for `--list` before using it and otherwise fall
    back to the `-list` option for compatibility with older versions.

diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 053c805..2a7f1e6 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -490,11 +490,30 @@ static std::string ListQt5RccInputs(cmSourceFile* sf,
 {
   std::string rccCommand
       = GetRccExecutable(target);
+
+  bool hasDashDashList = false;
+  {
+  std::vector<std::string> command;
+  command.push_back(rccCommand);
+  command.push_back("--help");
+  std::string rccStdOut;
+  std::string rccStdErr;
+  int retVal = 0;
+  bool result = cmSystemTools::RunSingleCommand(
+    command, &rccStdOut, &rccStdErr,
+    &retVal, 0, cmSystemTools::OUTPUT_NONE);
+  if (result && retVal == 0 &&
+      rccStdOut.find("--list") != std::string::npos)
+    {
+    hasDashDashList = true;
+    }
+  }
+
   std::vector<std::string> qrcEntries;
 
   std::vector<std::string> command;
   command.push_back(rccCommand);
-  command.push_back("--list");
+  command.push_back(hasDashDashList? "--list" : "-list");
 
   std::string absFile = cmsys::SystemTools::GetRealPath(
                                               sf->GetFullPath());

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

Summary of changes:
 Source/cmQtAutoGeneratorInitializer.cxx |   21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list