summaryrefslogtreecommitdiffstats
path: root/Source/cmGetDirectoryPropertyCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-08 20:00:37 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-08 20:18:40 (GMT)
commit8fc53c3ce89e76a4e5cf1968307c513041e9a7b7 (patch)
tree13aaf9e297bb019868a32a4f482bd4360f934a9a /Source/cmGetDirectoryPropertyCommand.cxx
parentd17aa60659a1a69f9101c61a149eca5842291226 (diff)
downloadCMake-8fc53c3ce89e76a4e5cf1968307c513041e9a7b7.zip
CMake-8fc53c3ce89e76a4e5cf1968307c513041e9a7b7.tar.gz
CMake-8fc53c3ce89e76a4e5cf1968307c513041e9a7b7.tar.bz2
cmGetDirectoryPropertyCommand: Extract StoreResult method.
Diffstat (limited to 'Source/cmGetDirectoryPropertyCommand.cxx')
-rw-r--r--Source/cmGetDirectoryPropertyCommand.cxx10
1 files changed, 8 insertions, 2 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;
}