diff options
Diffstat (limited to 'Source/cmGetDirectoryPropertyCommand.cxx')
-rw-r--r-- | Source/cmGetDirectoryPropertyCommand.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 7fbd479..d98f95c 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -13,6 +13,8 @@ namespace { void StoreResult(cmMakefile& makefile, std::string const& variable, const char* prop); +void StoreResult(cmMakefile& makefile, std::string const& variable, + cmProp prop); } // cmGetDirectoryPropertyCommand @@ -76,7 +78,6 @@ bool cmGetDirectoryPropertyCommand(std::vector<std::string> const& args, return false; } - const char* prop = nullptr; if (*i == "DEFINITIONS") { switch (status.GetMakefile().GetPolicyStatus(cmPolicies::CMP0059)) { case cmPolicies::WARN: @@ -94,8 +95,7 @@ bool cmGetDirectoryPropertyCommand(std::vector<std::string> const& args, break; } } - prop = cmToCStr(dir->GetProperty(*i)); - StoreResult(status.GetMakefile(), variable, prop); + StoreResult(status.GetMakefile(), variable, dir->GetProperty(*i)); return true; } @@ -105,4 +105,9 @@ void StoreResult(cmMakefile& makefile, std::string const& variable, { makefile.AddDefinition(variable, prop ? prop : ""); } +void StoreResult(cmMakefile& makefile, std::string const& variable, + cmProp prop) +{ + makefile.AddDefinition(variable, prop); +} } |