- /** Makes sure there are no duplicate entries in the lists. For warnings,
- contradicting flags are eliminated and the last one stays in effect. */
- void unique();
+ Tracked &operator=(T v) { value = v; set = true; return *this; }
+ operator T() const { return value; }
+ };
+
+ 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 local_incpath;
+ PathList libpath;
+ WordList libs;
+ Tracked<LibraryMode> libmode;
+ LibModeMap libmodes;
+ Tracked<bool> threads;
+ Tracked<bool> debug;
+ Tracked<int> optimize;
+ Tracked<bool> strip;
+ Tracked<unsigned> warning_level;
+ Tracked<bool> fatal_warnings;
+
+ 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.
+
+ The update level determines what information is updated. */
+ void update_from(const BuildInfo &, UpdateLevel = LOCAL);