diff options
author | Brad King <brad.king@kitware.com> | 2015-03-30 13:27:51 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-03-30 13:27:51 (GMT) |
commit | a3bdb5578d54894832195fa29308ceb6b4ceed93 (patch) | |
tree | c5081d675debe503942f0a07d5062345f6a6ae0f | |
parent | 8bc6cfd72717cbb1166b8aecb38d52d663006284 (diff) | |
parent | 4d08e6b6dd21658bdcdc4dc1cd2a2b03d377d531 (diff) | |
download | CMake-a3bdb5578d54894832195fa29308ceb6b4ceed93.zip CMake-a3bdb5578d54894832195fa29308ceb6b4ceed93.tar.gz CMake-a3bdb5578d54894832195fa29308ceb6b4ceed93.tar.bz2 |
Merge topic 'ninja-autogen'
4d08e6b6 QtAutogen: Fix rcc rebuild with Ninja generator (#15459)
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
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()); } |