mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05: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:
@@ -143,8 +143,7 @@ public:
|
||||
|
||||
// File pairs for implicit dependency scanning. The key of the map
|
||||
// is the depender and the value is the explicit dependee.
|
||||
struct ImplicitDependFileMap
|
||||
: public std::map<std::string, cmDepends::DependencyVector>
|
||||
struct ImplicitDependFileMap : public cmDepends::DependencyMap
|
||||
{
|
||||
};
|
||||
struct ImplicitDependLanguageMap
|
||||
@@ -230,10 +229,10 @@ protected:
|
||||
const char* filename = nullptr);
|
||||
|
||||
// Helper methods for dependency updates.
|
||||
bool ScanDependencies(
|
||||
std::string const& targetDir, std::string const& dependFile,
|
||||
std::string const& internalDependFile,
|
||||
std::map<std::string, cmDepends::DependencyVector>& validDeps);
|
||||
bool ScanDependencies(std::string const& targetDir,
|
||||
std::string const& dependFile,
|
||||
std::string const& internalDependFile,
|
||||
cmDepends::DependencyMap& validDeps);
|
||||
void CheckMultipleOutputs(bool verbose);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user