From 965da8d787ad0ca9b78f98cd276211e997016d07 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Thu, 21 Mar 2019 16:58:29 +0100 Subject: cmTarget: Acquire data only when needed --- Source/cmTarget.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0b83b6b..d3f7a45 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -315,10 +315,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, #endif } - // Collect the set of configuration types. - std::vector configNames; - mf->GetConfigurations(configNames); - // Setup per-configuration property default values. if (this->GetType() != cmStateEnums::UTILITY) { static const auto configProps = { @@ -328,6 +324,9 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, "COMPILE_PDB_OUTPUT_DIRECTORY_", "MAP_IMPORTED_CONFIG_", "INTERPROCEDURAL_OPTIMIZATION_" }; + // Collect the set of configuration types. + std::vector configNames; + mf->GetConfigurations(configNames); for (std::string const& configName : configNames) { std::string configUpper = cmSystemTools::UpperCase(configName); for (auto const& prop : configProps) { -- cgit v0.12