diff options
-rw-r--r-- | Source/cmGetDirectoryPropertyCommand.cxx | 10 | ||||
-rw-r--r-- | Source/cmGetDirectoryPropertyCommand.h | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 228e53c..bb1801c 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -89,12 +89,18 @@ bool cmGetDirectoryPropertyCommand { prop = dir->GetProperty(*i); } + this->StoreResult(variable, prop); + return true; +} + +void cmGetDirectoryPropertyCommand::StoreResult(std::string const& variable, + const char* prop) +{ if (prop) { this->Makefile->AddDefinition(variable, prop); - return true; + return; } this->Makefile->AddDefinition(variable, ""); - return true; } diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h index 6c5750a..f418886 100644 --- a/Source/cmGetDirectoryPropertyCommand.h +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -40,8 +40,9 @@ public: virtual std::string GetName() const { return "get_directory_property";} cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand); -}; - +private: + void StoreResult(const std::string& variable, const char* prop); +}; #endif |