summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2013-10-10 20:43:50 -0400
committerJake Petroules <jake.petroules@petroules.com>2013-10-11 18:20:07 +0200
commit82cd73db7134f87d866953e0f50d35de6f444120 (patch)
treedd6eb8929d2b0b0036b8e894539452606b4b2257 /share
parent129f9116a4d752c46ecb275e81f02e33cc61e2d0 (diff)
downloadqbs-82cd73db7134f87d866953e0f50d35de6f444120.tar.gz
Enforce canonical architecture names in qbs.architecture.
Change-Id: Ia9ec94d1d634f45db1c229b65b8856eff98a67c9 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/qbs/common.qbs15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs
index 10ffc5181..bd77c15b8 100644
--- a/share/qbs/modules/qbs/common.qbs
+++ b/share/qbs/modules/qbs/common.qbs
@@ -37,4 +37,19 @@ Module {
allowedValues: ['none', 'fast', 'small']
description: "optimization level"
}
+
+ validate: {
+ var architectureSynonyms = {
+ "x86": ["i386", "i486", "i586", "i686", "ia32", "ia-32", "x86_32", "x86-32", "intel32"],
+ "x86_64": ["x86-64", "x64", "amd64", "ia32e", "em64t", "intel64"],
+ "ia64": ["ia-64", "itanium"]
+ };
+
+ for (var arch in architectureSynonyms) {
+ if (architectureSynonyms[arch].contains(architecture.toLowerCase())) {
+ throw "qbs.architecture '" + architecture + "' is invalid. " +
+ "You must use the canonical name '" + arch + "'";
+ }
+ }
+ }
}