mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
cmDepends: Define DependencyMap instead of DependencyVector
In `cmDepends` use `typedef std::map<std::string, std::vector<std::string>> DependencyMap` instead of defining a `class DependencyVector : public std::vector<std::string>` and using it in `std::map<std::string, DependencyVector>`. Since `std::map<std::string, std::vector<std::string>>` is used in various other places, we now reuse all of it's auto generated methods. This doesn't happen when we use `DependencyVector` in a `std::map`, because it is a different class than `std::vector<std::string>`.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include "cmDepends.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
@@ -33,9 +32,9 @@ protected:
|
||||
bool WriteDependencies(const std::set<std::string>& sources,
|
||||
const std::string& file, std::ostream& makeDepends,
|
||||
std::ostream& internalDepends) override;
|
||||
bool CheckDependencies(
|
||||
std::istream& internalDepends, const std::string& internalDependsFileName,
|
||||
std::map<std::string, DependencyVector>& validDeps) override;
|
||||
bool CheckDependencies(std::istream& internalDepends,
|
||||
const std::string& internalDependsFileName,
|
||||
DependencyMap& validDeps) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user