summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-23 09:08:15 -0400
committerCMake Topic Stage <kwrobot@kitware.com>2015-06-23 09:08:15 -0400
commitbddfe77d12ee7d6ecaa3c4fa8ade1c4c0cab5760 (patch)
tree65e5ae7d6d97af0be04c12d05c31df16a64073bb /Source
parent6ccb534df3a131d87ea14082fea05484039fc524 (diff)
parent2bf22a4b908592e363fc9aa93b3d09fbb5387b4d (diff)
downloadcmake-bddfe77d12ee7d6ecaa3c4fa8ade1c4c0cab5760.tar.gz
Merge topic 'qt-autogen-always-run'
2bf22a4b QtAutogen: Add comment explaining why rcc cannot use PRE_BUILD 0e346427 QtAutogen: Always run autogen step even when rcc is enabled (#15608)
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutoGenerators.cxx25
1 files changed, 4 insertions, 21 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 53fea83794..f05b3823b1 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -439,6 +439,9 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
this->ListQt4RccInputs(sf, depends);
}
#if defined(_WIN32) && !defined(__CYGWIN__)
+ // Cannot use PRE_BUILD because the resource files themselves
+ // may not be sources within the target so VS may not know the
+ // target needs to re-build at all.
usePRE_BUILD = false;
#endif
}
@@ -465,31 +468,11 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
else
#endif
{
- cmTarget* autogenTarget = 0;
- if (!rcc_output.empty() && !isNinja)
- {
- std::vector<std::string> no_byproducts;
- makefile->AddCustomCommandToOutput(rcc_output, no_byproducts,
- depends, "",
- commandLines, 0,
- workingDirectory.c_str(),
- false, false);
-
- cmCustomCommandLines no_commands;
- autogenTarget = makefile->AddUtilityCommand(
- autogenTargetName, true,
- workingDirectory.c_str(), rcc_output,
- no_commands, false, autogenComment.c_str());
-
- }
- else
- {
- autogenTarget = makefile->AddUtilityCommand(
+ cmTarget* autogenTarget = makefile->AddUtilityCommand(
autogenTargetName, true,
workingDirectory.c_str(),
/*byproducts=*/rcc_output, depends,
commandLines, false, autogenComment.c_str());
- }
// Set target folder
const char* autogenFolder = makefile->GetState()