diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-03 10:34:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-03 10:34:18 +0200 |
commit | 66438e8e5f6fcf77ef6d4c32fda000168b37cd7a (patch) | |
tree | 14d35b5fafe66417e910f39bb6dbd1d85a3b42a5 /libbuild2 | |
parent | 3ec24f8b32f44cb928900edfd4310361a87b6801 (diff) |
Move config::variable_visibility to separate types.hxx header
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/config/types.hxx | 25 | ||||
-rw-r--r-- | libbuild2/config/utility.hxx | 10 |
2 files changed, 27 insertions, 8 deletions
diff --git a/libbuild2/config/types.hxx b/libbuild2/config/types.hxx new file mode 100644 index 0000000..3cdc5e3 --- /dev/null +++ b/libbuild2/config/types.hxx @@ -0,0 +1,25 @@ +// file : libbuild2/config/types.hxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#ifndef LIBBUILD2_CONFIG_TYPES_HXX +#define LIBBUILD2_CONFIG_TYPES_HXX + +#include <libbuild2/types.hxx> + +namespace build2 +{ + namespace config + { + // The origin of the value of a configuration variable. + // + enum class variable_origin + { + undefined, // Undefined. + default_, // Default value from the config directive. + buildfile, // Value from a buildfile, normally config.build. + override_ // Value from a command line override. + }; + } +} + +#endif // LIBBUILD2_CONFIG_TYPES_HXX diff --git a/libbuild2/config/utility.hxx b/libbuild2/config/utility.hxx index 050339a..b998e3c 100644 --- a/libbuild2/config/utility.hxx +++ b/libbuild2/config/utility.hxx @@ -11,6 +11,8 @@ #include <libbuild2/scope.hxx> #include <libbuild2/variable.hxx> +#include <libbuild2/config/types.hxx> + #include <libbuild2/export.hxx> namespace build2 @@ -507,14 +509,6 @@ namespace build2 // // Throws invalid_argument if the passed variable is not config.*. // - enum class variable_origin - { - undefined, // Undefined. - default_, // Default value from the config directive. - buildfile, // Value from a buildfile, normally config.build. - override_ // Value from a command line override. - }; - LIBBUILD2_SYMEXPORT pair<variable_origin, lookup> origin (const scope& rs, const string& name); |