diff options
| author | Jake Petroules <jake.petroules@petroules.com> | 2013-10-10 20:43:50 -0400 |
|---|---|---|
| committer | Jake Petroules <jake.petroules@petroules.com> | 2013-10-11 18:20:07 +0200 |
| commit | 82cd73db7134f87d866953e0f50d35de6f444120 (patch) | |
| tree | dd6eb8929d2b0b0036b8e894539452606b4b2257 /share | |
| parent | 129f9116a4d752c46ecb275e81f02e33cc61e2d0 (diff) | |
| download | qbs-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.qbs | 15 |
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 + "'"; + } + } + } } |
