summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-02-15 13:49:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-02-15 13:49:44 (GMT)
commitb5d18cbd7777cba22f844b0b3672db20ab21c836 (patch)
tree889756209ca11e72436b92131d1dd6e679640ec4 /Source
parentcab9838b4c015d57476b579275adcad4e724354f (diff)
parentb513a879ec0dc23df1d4557d17b3b2fed3b94f7b (diff)
downloadCMake-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.cxx14
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);
}