diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-10-24 09:22:50 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-11-03 11:14:40 (GMT) |
commit | b5e895b5d41dc688bf0acdec352cbccc178a7236 (patch) | |
tree | ec8b65fd661689d0c814f1e9583b12ce402e23fa /Source/cmQtAutoGenInitializer.cxx | |
parent | 443c574a7cc39ea490fabd1392108e651806a3e6 (diff) | |
download | CMake-b5e895b5d41dc688bf0acdec352cbccc178a7236.zip CMake-b5e895b5d41dc688bf0acdec352cbccc178a7236.tar.gz CMake-b5e895b5d41dc688bf0acdec352cbccc178a7236.tar.bz2 |
Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS support
This adds
- the variable ``CMAKE_AUTOGEN_ORIGIN_DEPENDS`` which initializes
- the target property ``AUTOGEN_ORIGIN_DEPENDS``
which controls whether or not the origin target dependencies
should be forwarded to the corresponding ``_autogen`` target.
The default value of ``CMAKE_AUTOGEN_ORIGIN_DEPENDS`` is ``ON``
which corresponds to the behavior that is in place since CMake 3.9.
Closes: #18493
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 7700767..a213c84 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -322,6 +322,9 @@ bool cmQtAutoGenInitializer::InitCustomTargets() // Autogen target: Compute user defined dependencies { + this->AutogenTarget.DependOrigin = + this->Target->GetPropertyAsBool("AUTOGEN_ORIGIN_DEPENDS"); + std::string const deps = this->Target->GetSafeProperty("AUTOGEN_TARGET_DEPENDS"); if (!deps.empty()) { @@ -904,7 +907,7 @@ bool cmQtAutoGenInitializer::InitAutogenTarget() // Add link library target dependencies to the autogen target // dependencies - { + if (this->AutogenTarget.DependOrigin) { // add_dependencies/addUtility do not support generator expressions. // We depend only on the libraries found in all configs therefore. std::map<cmGeneratorTarget const*, std::size_t> commonTargets; @@ -941,8 +944,10 @@ bool cmQtAutoGenInitializer::InitAutogenTarget() new cmGeneratorTarget(autogenTarget, localGen)); // Forward origin utilities to autogen target - for (BT<std::string> const& depName : this->Target->GetUtilities()) { - autogenTarget->AddUtility(depName.Value, makefile); + if (this->AutogenTarget.DependOrigin) { + for (BT<std::string> const& depName : this->Target->GetUtilities()) { + autogenTarget->AddUtility(depName.Value, makefile); + } } // Add additional autogen target dependencies to autogen target for (cmTarget* depTarget : this->AutogenTarget.DependTargets) { |