[Cmake-commits] CMake branch, next, updated. v3.2.1-1265-gd19d3bd
Brad King
brad.king at kitware.com
Fri Mar 27 15:36:07 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 d19d3bd1b3e67c566b7a2bf1bbf18c0aff29a559 (commit)
via 4d08e6b6dd21658bdcdc4dc1cd2a2b03d377d531 (commit)
from 58dbf94b66d3afb955cff3dffe01f39ad383e303 (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=d19d3bd1b3e67c566b7a2bf1bbf18c0aff29a559
commit d19d3bd1b3e67c566b7a2bf1bbf18c0aff29a559
Merge: 58dbf94 4d08e6b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Mar 27 15:36:06 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Mar 27 15:36:06 2015 -0400
Merge topic 'ninja-autogen' into next
4d08e6b6 QtAutogen: Fix rcc rebuild with Ninja generator (#15459)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d08e6b6dd21658bdcdc4dc1cd2a2b03d377d531
commit 4d08e6b6dd21658bdcdc4dc1cd2a2b03d377d531
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Mar 27 15:27:40 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Mar 27 15:33:19 2015 -0400
QtAutogen: Fix rcc rebuild with Ninja generator (#15459)
The rcc outputs are byproducts of the cmake_autogen rule, not outputs.
We still must run cmake_autogen on every run even if the rcc outputs
exist. Ninja requires explicit byproduct specification, which is now
possible in CMake since commit v3.2.0-rc1~340^2~2 (Add an option for
explicit BYPRODUCTS of custom commands, 2014-11-13). Revise the logic
introduced by commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files
if their input changes, 2014-09-17) to specify byproducts explicitly.
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 08092c7..4cb49c8 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -374,7 +374,9 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
#endif
std::vector<std::string> rcc_output;
- if(makefile->GetLocalGenerator()->GetGlobalGenerator()->GetName() == "Ninja"
+ bool const isNinja =
+ makefile->GetLocalGenerator()->GetGlobalGenerator()->GetName() == "Ninja";
+ if(isNinja
#if defined(_WIN32) && !defined(__CYGWIN__)
|| usePRE_BUILD
#endif
@@ -444,7 +446,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
#endif
{
cmTarget* autogenTarget = 0;
- if (!rcc_output.empty())
+ if (!rcc_output.empty() && !isNinja)
{
std::vector<std::string> no_byproducts;
makefile->AddCustomCommandToOutput(rcc_output, no_byproducts,
@@ -464,7 +466,8 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
{
autogenTarget = makefile->AddUtilityCommand(
autogenTargetName, true,
- workingDirectory.c_str(), depends,
+ workingDirectory.c_str(),
+ /*byproducts=*/rcc_output, depends,
commandLines, false, autogenComment.c_str());
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmQtAutoGenerators.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list