From 112cba927abfd54e72d12831dc668148c1465446 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 5 Mar 2014 13:43:50 +0100 Subject: QtAutogen: Fix AUTOGEN depends on custom command output with VS. Visual Studio is handled as a special case for autogen depends. However, the special handling works only for target dependencies, not file dependencies output by a custom command. Use a PRE_BUILD step only if all depends are targets. --- Source/cmQtAutoGenerators.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Source') diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index dfb310e541..2c5dd450d4 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -260,6 +260,18 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target) // This also works around a VS 11 bug that may skip updating the target: // https://connect.microsoft.com/VisualStudio/feedback/details/769495 usePRE_BUILD = vslg->GetVersion() >= cmLocalVisualStudioGenerator::VS7; + if(usePRE_BUILD) + { + for (std::vector::iterator it = depends.begin(); + it != depends.end(); ++it) + { + if(!makefile->FindTargetToUse(it->c_str())) + { + usePRE_BUILD = false; + break; + } + } + } } if(usePRE_BUILD) { -- cgit v1.2.1