diff options
author | Justin Goshi <jgoshi@microsoft.com> | 2017-11-14 21:42:32 (GMT) |
---|---|---|
committer | Justin Goshi <jgoshi@microsoft.com> | 2017-11-17 17:19:26 (GMT) |
commit | fe2c2b0ffb567ca7d51036c69845091f70736a50 (patch) | |
tree | 4a61f5a8062b3e737bd8bea228b5309cb60148f4 /Source/cmMakefile.cxx | |
parent | d23a0c4d0e35d50f8f3f1a950a68df576294a77a (diff) | |
download | CMake-fe2c2b0ffb567ca7d51036c69845091f70736a50.zip CMake-fe2c2b0ffb567ca7d51036c69845091f70736a50.tar.gz CMake-fe2c2b0ffb567ca7d51036c69845091f70736a50.tar.bz2 |
server: ctestInfo fix to return all tests
Prior to this change we were looking at targets. But tests are
associated with directories. This change fixes how we gather all tests.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4109b90..d166c7c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3319,13 +3319,6 @@ cmGlobalGenerator* cmMakefile::GetGlobalGenerator() const return this->GlobalGenerator; } -void cmMakefile::GetTestNames(std::vector<std::string>& testNames) -{ - for (const auto& iter : Tests) { - testNames.push_back(iter.first); - } -} - #ifdef CMAKE_BUILD_WITH_CMAKE cmVariableWatch* cmMakefile::GetVariableWatch() const { @@ -3661,6 +3654,16 @@ cmTest* cmMakefile::GetTest(const std::string& testName) const return nullptr; } +void cmMakefile::GetTests(const std::string& config, + std::vector<cmTest*>& tests) +{ + for (auto generator : this->GetTestGenerators()) { + if (generator->TestsForConfig(config)) { + tests.push_back(generator->GetTest()); + } + } +} + void cmMakefile::AddCMakeDependFilesFromUser() { std::vector<std::string> deps; |