summaryrefslogtreecommitdiff
path: root/Source/cmCustomCommand.h
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2021-12-12 15:01:20 +0900
committerBrad King <brad.king@kitware.com>2021-12-14 10:48:43 -0500
commit780341f360773d7b3b766b835bd539f46397e0a6 (patch)
tree767cdbaa73a9b9c7c38a31ab962034f1386d918f /Source/cmCustomCommand.h
parenta6fa3fa136c291c36aefbc79b62995a63bf9107b (diff)
downloadcmake-780341f360773d7b3b766b835bd539f46397e0a6.tar.gz
cmCustomCommand: Track main dependency explicitly
Store the main dependency as the first entry in the dependency list plus a boolean member indicating its existence. Note that this slightly changes existing behavior: the main dependency was previously the last entry of the dependency list.
Diffstat (limited to 'Source/cmCustomCommand.h')
-rw-r--r--Source/cmCustomCommand.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h
index 5ae26dd0dd..5533847ae1 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -38,6 +38,10 @@ public:
const std::vector<std::string>& GetDepends() const;
void SetDepends(std::vector<std::string> depends);
+ bool HasMainDependency() const { return this->HasMainDependency_; }
+ const std::string& GetMainDependency() const;
+ void SetMainDependency(std::string main_dependency);
+
/** Get the working directory. */
std::string const& GetWorkingDirectory() const
{
@@ -130,5 +134,6 @@ private:
bool UsesTerminal = false;
bool CommandExpandLists = false;
bool StdPipesUTF8 = false;
+ bool HasMainDependency_ = false;
cmPolicies::PolicyStatus CMP0116Status = cmPolicies::WARN;
};