summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-01-05 20:00:57 (GMT)
committerBrad King <brad.king@kitware.com>2009-01-05 20:00:57 (GMT)
commited3bb743f4c2687187e1721c5ccc64dd06cc3db5 (patch)
treeb29e9e94d7f4a770aa3fd4d4cf980b9ff78f699f /Source/cmMakefile.h
parentb5f3d4be61a9613abc7288f1cf31248412bfc50d (diff)
downloadCMake-ed3bb743f4c2687187e1721c5ccc64dd06cc3db5.zip
CMake-ed3bb743f4c2687187e1721c5ccc64dd06cc3db5.tar.gz
CMake-ed3bb743f4c2687187e1721c5ccc64dd06cc3db5.tar.bz2
ENH: Improve test property speed with a map
Previously we stored a vector of tests to preserve their order. Property set/get operations would do a linear search for matching tests. This uses a map to efficiently look up tests while keeping the original order with a vector for test file generation.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 5a12d2e..c0e0bf4 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -737,7 +737,6 @@ public:
*/
cmTest* GetTest(const char* testName) const;
const std::vector<cmTest*> *GetTests() const;
- std::vector<cmTest*> *GetTests();
/**
* Get a list of macros as a ; separated string
@@ -807,7 +806,8 @@ protected:
std::vector<cmSourceFile*> SourceFiles;
// Tests
- std::vector<cmTest*> Tests;
+ std::map<cmStdString, cmTest*> Tests;
+ std::vector<cmTest*> OrderedTests;
// The include and link-library paths. These may have order
// dependency, so they must be vectors (not set).