]> git.tdb.fi Git - builder.git/blobdiff - source/buildinfo.h
Support specifying library modes on a per-library basis
[builder.git] / source / buildinfo.h
index 595fe1a55ccd5bb414ebbe5febec8f86431465b2..e0ff0bff74ccf15cf0177f2cfee3e04db265d108 100644 (file)
@@ -28,6 +28,7 @@ public:
        private:
                void incpath(const std::string &);
                void define(const std::string &, const std::string &);
+               void libmode_for_lib(const std::string &, LibraryMode);
                void libpath(const std::string &);
                void library(const std::string &);
        };
@@ -68,12 +69,14 @@ public:
        typedef std::map<std::string, std::string> DefineMap;
        typedef std::list<Msp::FS::Path> PathList;
        typedef std::list<std::string> WordList;
+       typedef std::map<std::string, LibraryMode> LibModeMap;
 
        DefineMap defines;
        PathList incpath;
        PathList libpath;
        WordList libs;
        Tracked<LibraryMode> libmode;
+       LibModeMap libmodes;
        Tracked<bool> threads;
        Tracked<bool> debug;
        Tracked<int> optimize;
@@ -83,6 +86,11 @@ public:
 
        BuildInfo();
 
+       /** Returns the library mode for linking a particular library.  If no mode
+       has been specified for that library, the the global library mode is
+       returned. */
+       LibraryMode get_libmode_for(const std::string &) const;
+
        /** Updates the BuildInfo from another one.  Lists are concatenated, with
        the first occurrence of each item preserved.  Scalars are overwritten.