]> git.tdb.fi Git - builder.git/blobdiff - source/virtualfilesystem.h
Cache result of parsing $PATH
[builder.git] / source / virtualfilesystem.h
index 6a92125316b9fc7465d49a4efa88661f8daee76d..9a25930aa8a8cf693980cf80720a23bb3508623b 100644 (file)
@@ -10,6 +10,7 @@
 class Builder;
 class FileTarget;
 class Pattern;
+class Tool;
 
 /**
 Provides access to the filesystem in a way that takes known targets into
@@ -19,14 +20,13 @@ possible to build them.
 class VirtualFileSystem
 {
 public:
-       typedef std::list<Msp::FS::Path> SearchPath;
+       using SearchPath = std::list<Msp::FS::Path>;
 
 private:
-       typedef std::map<Msp::FS::Path, FileTarget *> TargetMap;
-
        Builder &builder;
-       TargetMap targets;
+       std::map<Msp::FS::Path, FileTarget *> targets;
        std::set<Msp::FS::Path> nonexistent;
+       SearchPath sys_bin_path;
 
 public:
        VirtualFileSystem(Builder &);
@@ -42,7 +42,7 @@ public:
        /** Locates a source file.  If a file is found but no target is associated
        with it, a new package-less target is created with the appropriate tool.  If
        use_syspath is true, the system path reported by the tool is also searched. */
-       FileTarget *find_header(const std::string &, const SearchPath &, bool use_syspath = true);
+       FileTarget *find_header(const std::string &, Tool *, const SearchPath &, bool use_syspath = true);
 
        /** Locates a library.  The library name should be the same as what would be
        used in linking with the library.  If a file is found but no target is