aboutsummaryrefslogtreecommitdiff
path: root/libbbot/build-config.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbbot/build-config.cxx')
-rw-r--r--libbbot/build-config.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/libbbot/build-config.cxx b/libbbot/build-config.cxx
index c46cffd..01ce57e 100644
--- a/libbbot/build-config.cxx
+++ b/libbbot/build-config.cxx
@@ -75,14 +75,6 @@ namespace bbot
config.name = move (tl[i].value);
- // Make sure the name is unique.
- //
- for (const auto& c: r)
- {
- if (c.name == config.name)
- bad_line ("duplicate configuration name");
- }
-
if (++i == n)
bad_line ("no target found");
@@ -116,6 +108,14 @@ namespace bbot
bad_line (e.what ());
}
+ // Make sure the name/target combination is unique.
+ //
+ for (const auto& c: r)
+ {
+ if (c.name == config.name && c.target == config.target)
+ bad_line ("duplicate configuration name/target");
+ }
+
if (++i == n)
bad_line ("no classes found");