diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c5703a1..ad19e03 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -28,6 +28,7 @@ #include "cmMakefile.h" #include "cmMessageType.h" #include "cmProperty.h" +#include "cmPropertyDefinition.h" #include "cmPropertyMap.h" #include "cmRange.h" #include "cmSourceFile.h" @@ -557,6 +558,16 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, } } } + + for (auto const& prop : mf->GetState()->GetPropertyDefinitions().GetMap()) { + if (prop.first.second == cmProperty::TARGET && + !prop.second.GetInitializeFromVariable().empty()) { + if (auto value = + mf->GetDefinition(prop.second.GetInitializeFromVariable())) { + this->SetProperty(prop.first.first, value); + } + } + } } cmTarget::cmTarget(cmTarget&&) noexcept = default; |