summaryrefslogtreecommitdiffstats
path: root/Source/cmGetSourceFilePropertyCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-13 13:52:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-13 13:52:34 (GMT)
commitbacb50afa9ed7806a8900ab7524f2f4a4cd7d669 (patch)
tree75fb21b14c4ed42cdca1d9adfc3dad6e38f88927 /Source/cmGetSourceFilePropertyCommand.cxx
parent729c928c7b59919a9d379891973bda22665c75da (diff)
parenta81e9a0ced25490d1384316834dff36a55d4e864 (diff)
downloadCMake-bacb50afa9ed7806a8900ab7524f2f4a4cd7d669.zip
CMake-bacb50afa9ed7806a8900ab7524f2f4a4cd7d669.tar.gz
CMake-bacb50afa9ed7806a8900ab7524f2f4a4cd7d669.tar.bz2
Merge topic 'free-free-set-them-free'
a81e9a0ced cmSubdirCommand: Port away from cmCommand 573cd4e4b4 cmSetTestsPropertiesCommand: Port away from cmCommand 95f23ea5d5 cmSetSourceFilesPropertiesCommand: Port away from cmCommand 706400d417 cmRemoveDefinitionsCommand: Port away from cmCommand 7f86990262 cmQTWrapUICommand: Port away from cmCommand 56bfb8de5d cmQTWrapCPPCommand: Port away from cmCommand 83b3f76a3b cmLinkLibrariesCommand: Port away from cmCommand b85407ae76 cmInstallTargetsCommand: Port away from cmCommand ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3807
Diffstat (limited to 'Source/cmGetSourceFilePropertyCommand.cxx')
-rw-r--r--Source/cmGetSourceFilePropertyCommand.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx
index 5c1c8a5..eefdc6c 100644
--- a/Source/cmGetSourceFilePropertyCommand.cxx
+++ b/Source/cmGetSourceFilePropertyCommand.cxx
@@ -2,26 +2,25 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmGetSourceFilePropertyCommand.h"
+#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
-class cmExecutionStatus;
-
-// cmSetSourceFilePropertyCommand
-bool cmGetSourceFilePropertyCommand::InitialPass(
- std::vector<std::string> const& args, cmExecutionStatus&)
+bool cmGetSourceFilePropertyCommand(std::vector<std::string> const& args,
+ cmExecutionStatus& status)
{
if (args.size() != 3) {
- this->SetError("called with incorrect number of arguments");
+ status.SetError("called with incorrect number of arguments");
return false;
}
std::string const& var = args[0];
std::string const& file = args[1];
- cmSourceFile* sf = this->Makefile->GetSource(file);
+ cmMakefile& mf = status.GetMakefile();
+ cmSourceFile* sf = mf.GetSource(file);
// for the location we must create a source file first
if (!sf && args[2] == "LOCATION") {
- sf = this->Makefile->CreateSource(file);
+ sf = mf.CreateSource(file);
}
if (sf) {
const char* prop = nullptr;
@@ -29,11 +28,11 @@ bool cmGetSourceFilePropertyCommand::InitialPass(
prop = sf->GetPropertyForUser(args[2]);
}
if (prop) {
- this->Makefile->AddDefinition(var, prop);
+ mf.AddDefinition(var, prop);
return true;
}
}
- this->Makefile->AddDefinition(var, "NOTFOUND");
+ mf.AddDefinition(var, "NOTFOUND");
return true;
}