aboutsummaryrefslogtreecommitdiff
path: root/build/cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-01 12:18:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-01 12:18:40 +0200
commite0de4f26fcf598b4f6beaa2847c4d43a4c761f5b (patch)
tree42e79e141d5b3488cb98843589a68001c875ed01 /build/cxx
parent0dee00f28e623830e816c4002c8004c86055df85 (diff)
Warn about configured/command line value mismatch
Also store configured but unspecified values
Diffstat (limited to 'build/cxx')
-rw-r--r--build/cxx/module.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/build/cxx/module.cxx b/build/cxx/module.cxx
index eb7ca40..1179ce3 100644
--- a/build/cxx/module.cxx
+++ b/build/cxx/module.cxx
@@ -104,31 +104,41 @@ namespace build
//
// These are optional so all we need to do is "import" them
// into the root scope if they were specified on the command
- // line.
+ // line and set them to empty if unspecified (the last part
+ // is important for the "configured as undefined" vs
+ // "unconfigured" logic).
//
if (auto val = root["config.cxx.poptions"])
{
if (&val.scope () == global_scope)
root.variables["config.cxx.poptions"] = val;
}
+ else
+ root.variables["config.cxx.poptions"]; // Undefined.
if (auto val = root["config.cxx.coptions"])
{
if (&val.scope () == global_scope)
root.variables["config.cxx.coptions"] = val;
}
+ else
+ root.variables["config.cxx.coptions"]; // Undefined.
if (auto val = root["config.cxx.loptions"])
{
if (&val.scope () == global_scope)
root.variables["config.cxx.loptions"] = val;
}
+ else
+ root.variables["config.cxx.loptions"]; // Undefined.
if (auto val = root["config.cxx.libs"])
{
if (&val.scope () == global_scope)
root.variables["config.cxx.libs"] = val;
}
+ else
+ root.variables["config.cxx.libs"]; // Undefined.
}
}
}