// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef TOOLS_GN_CONFIG_VALUES_H_ #define TOOLS_GN_CONFIG_VALUES_H_ #include #include #include "base/basictypes.h" #include "tools/gn/source_dir.h" // Holds the values (includes, defines, compiler flags, etc.) for a given // config or target. class ConfigValues { public: ConfigValues(); ~ConfigValues(); const std::vector& includes() const { return includes_; } void swap_in_includes(std::vector* lo) { includes_.swap(*lo); } #define VALUES_ACCESSOR(name) \ const std::vector& name() const { return name##_; } \ void swap_in_##name(std::vector* v) { name##_.swap(*v); } VALUES_ACCESSOR(defines) VALUES_ACCESSOR(cflags) VALUES_ACCESSOR(cflags_c) VALUES_ACCESSOR(cflags_cc) VALUES_ACCESSOR(cflags_objc) VALUES_ACCESSOR(cflags_objcc) VALUES_ACCESSOR(ldflags) #undef VALUES_ACCESSOR private: std::vector includes_; std::vector defines_; std::vector cflags_; std::vector cflags_c_; std::vector cflags_cc_; std::vector cflags_objc_; std::vector cflags_objcc_; std::vector ldflags_; DISALLOW_COPY_AND_ASSIGN(ConfigValues); }; #endif // TOOLS_GN_CONFIG_VALUES_H_