summaryrefslogtreecommitdiff
path: root/Source/cmCustomCommand.h
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-12-19 14:14:18 +0200
committerRaul Tambre <raul@tambre.ee>2021-05-31 10:39:58 +0300
commit1cb4f592a09752972d89785c0e8f1e160d5b5c4e (patch)
tree0afc49c1b2e286cf9f24feb9da0b1f52b4a197f8 /Source/cmCustomCommand.h
parent7676e11943a6446e3cdc60370a37e4ce9cc548d3 (diff)
downloadcmake-1cb4f592a09752972d89785c0e8f1e160d5b5c4e.tar.gz
add_custom_command: Target-dependent generator expression support
OUTPUT variant with a TARGET given to allow resolving target-based generator expressions wouldn't work because OUTPUT is resolved before generator targets are created, i.e. FindGeneratorTargetToUse() returns nullptr. This is a known limitation, see #21364. Implements #21336.
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 e22c7a4064..5cbd3d17a9 100644
--- a/Source/cmCustomCommand.h
+++ b/Source/cmCustomCommand.h
@@ -100,6 +100,10 @@ public:
cmPolicies::PolicyStatus GetCMP0116Status() const;
void SetCMP0116Status(cmPolicies::PolicyStatus cmp0116);
+ /** Set/Get the associated target */
+ const std::string& GetTarget() const;
+ void SetTarget(const std::string& target);
+
private:
std::vector<std::string> Outputs;
std::vector<std::string> Byproducts;
@@ -107,6 +111,7 @@ private:
cmCustomCommandLines CommandLines;
cmListFileBacktrace Backtrace;
cmImplicitDependsList ImplicitDepends;
+ std::string Target;
std::string Comment;
std::string WorkingDirectory;
std::string Depfile;