aboutsummaryrefslogtreecommitdiff
path: root/build/cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/cxx')
-rw-r--r--build/cxx/module.cxx60
1 files changed, 38 insertions, 22 deletions
diff --git a/build/cxx/module.cxx b/build/cxx/module.cxx
index 2bfdc41..e29d311 100644
--- a/build/cxx/module.cxx
+++ b/build/cxx/module.cxx
@@ -104,41 +104,57 @@ 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 and set them to empty if unspecified (the last part
+ // line and set them to NULL if unspecified (the last part
// is important to distinguish between the "configured as
- // undefined" and "not configured" cases).
+ // unspecified" and "not configured" cases).
//
- if (auto val = root["config.cxx.poptions"])
{
- if (val.scope == global_scope)
- root.variables["config.cxx.poptions"] = val;
+ auto v (root["config.cxx.poptions"]);
+
+ if (v.defined ())
+ {
+ if (v.scope == global_scope)
+ root.variables["config.cxx.poptions"] = v;
+ }
+ else
+ root.variables["config.cxx.poptions"]; // Set to NULL.
}
- 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;
+ auto v (root["config.cxx.coptions"]);
+
+ if (v.defined ())
+ {
+ if (v.scope == global_scope)
+ root.variables["config.cxx.coptions"] = v;
+ }
+ else
+ root.variables["config.cxx.coptions"]; // Set to NULL.
}
- 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;
+ auto v (root["config.cxx.loptions"]);
+
+ if (v.defined ())
+ {
+ if (v.scope == global_scope)
+ root.variables["config.cxx.loptions"] = v;
+ }
+ else
+ root.variables["config.cxx.loptions"]; // Set to NULL.
}
- 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;
+ auto v (root["config.cxx.libs"]);
+
+ if (v.defined ())
+ {
+ if (v.scope == global_scope)
+ root.variables["config.cxx.libs"] = v;
+ }
+ else
+ root.variables["config.cxx.libs"]; // Set to NULL.
}
- else
- root.variables["config.cxx.libs"]; // Undefined.
}
}
}