diff options
author | Alex Reinking <alex.reinking@gmail.com> | 2022-08-14 08:11:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-15 18:19:16 (GMT) |
commit | e2854b4fa25778b66473a75a0bf3ca4bfdec5a54 (patch) | |
tree | beb60b0d5d91cfb38f06869ca5240a9c8d61d53f /Source/cmSystemTools.h | |
parent | bfa1c5285b0db8f7dfe8e7c5ac546312723f59db (diff) | |
download | CMake-e2854b4fa25778b66473a75a0bf3ca4bfdec5a54.zip CMake-e2854b4fa25778b66473a75a0bf3ca4bfdec5a54.tar.gz CMake-e2854b4fa25778b66473a75a0bf3ca4bfdec5a54.tar.bz2 |
cmCTestRunTest: Implement the ENVIRONMENT test property with EnvDiff too
Going through the same internal API for both `ENVIRONMENT` and
`ENVIRONMENT_MODIFICATION` properties will make it easier to implement
checkpointing for `MYVAR=reset:` more efficiently if the need ever
presents itself. It also makes the two-stage nature of the environment
mutation clearer in the code itself.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 3c5c28c..e8c04b1 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -388,6 +388,15 @@ public: class EnvDiff { public: + /** Append multiple variables to the current environment diff */ + void AppendEnv(std::vector<std::string> const& env); + + /** + * Add a single variable (or remove if no = sign) to the current + * environment diff. + */ + void PutEnv(const std::string& env); + /** * Apply an ENVIRONMENT_MODIFICATION operation to this diff. Returns * false and issues an error on parse failure. |