diff options
author | Brad King <brad.king@kitware.com> | 2018-02-15 13:49:21 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-02-15 13:49:44 (GMT) |
commit | b5d18cbd7777cba22f844b0b3672db20ab21c836 (patch) | |
tree | 889756209ca11e72436b92131d1dd6e679640ec4 /Source | |
parent | cab9838b4c015d57476b579275adcad4e724354f (diff) | |
parent | b513a879ec0dc23df1d4557d17b3b2fed3b94f7b (diff) | |
download | CMake-b5d18cbd7777cba22f844b0b3672db20ab21c836.zip CMake-b5d18cbd7777cba22f844b0b3672db20ab21c836.tar.gz CMake-b5d18cbd7777cba22f844b0b3672db20ab21c836.tar.bz2 |
Merge topic 'directory-property-TESTS'
b513a879 Tests management: add TESTS directory property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1748
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index b468208..82c6e81 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3641,6 +3641,20 @@ void cmMakefile::AppendProperty(const std::string& prop, const char* value, const char* cmMakefile::GetProperty(const std::string& prop) const { + // Check for computed properties. + static std::string output; + if (prop == "TESTS") { + std::vector<std::string> keys; + // get list of keys + std::transform(this->Tests.begin(), this->Tests.end(), + std::back_inserter(keys), + [](decltype(this->Tests)::value_type const& pair) { + return pair.first; + }); + output = cmJoin(keys, ";"); + return output.c_str(); + } + return this->StateSnapshot.GetDirectory().GetProperty(prop); } |