summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@sap.com>2018-02-01 14:49:22 (GMT)
committerMarc Chevrier <marc.chevrier@sap.com>2018-02-08 18:16:28 (GMT)
commitb513a879ec0dc23df1d4557d17b3b2fed3b94f7b (patch)
treed88221b5bd1eaf40dd0acaabdfa1feb378c82f3c /Source/cmMakefile.cxx
parent1da3f3e916de5ac6e64b473575d02bb3d358fc76 (diff)
downloadCMake-b513a879ec0dc23df1d4557d17b3b2fed3b94f7b.zip
CMake-b513a879ec0dc23df1d4557d17b3b2fed3b94f7b.tar.gz
CMake-b513a879ec0dc23df1d4557d17b3b2fed3b94f7b.tar.bz2
Tests management: add TESTS directory property
Implements: #17680
Diffstat (limited to 'Source/cmMakefile.cxx')
-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);
}