diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-05 12:43:50 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-03-10 12:01:29 (GMT) |
commit | 112cba927abfd54e72d12831dc668148c1465446 (patch) | |
tree | 89417c300dfbd26331acea28fbc00dfd21b66ffd /Source | |
parent | 948d5d18fd6deed24ede54cb0e3b017511f99559 (diff) | |
download | CMake-112cba927abfd54e72d12831dc668148c1465446.zip CMake-112cba927abfd54e72d12831dc668148c1465446.tar.gz CMake-112cba927abfd54e72d12831dc668148c1465446.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index dfb310e..2c5dd45 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<std::string>::iterator it = depends.begin(); + it != depends.end(); ++it) + { + if(!makefile->FindTargetToUse(it->c_str())) + { + usePRE_BUILD = false; + break; + } + } + } } if(usePRE_BUILD) { |