summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2010-12-22 19:31:30 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2010-12-22 19:31:30 (GMT)
commit887a7951ec46c51517dabe3ccaf4bed32ddea12f (patch)
treecd55b1629c6867288a002b28727e037c5a4c72c2
parent8b3eb7fd058422adaa580d178fa143f3d8590dd4 (diff)
downloadSCons-887a7951ec46c51517dabe3ccaf4bed32ddea12f.zip
SCons-887a7951ec46c51517dabe3ccaf4bed32ddea12f.tar.gz
SCons-887a7951ec46c51517dabe3ccaf4bed32ddea12f.tar.bz2
Fix intel compiler to sort versions >9 correctly (esp. on Linux)
-rw-r--r--src/engine/SCons/Tool/intelc.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/intelc.py b/src/engine/SCons/Tool/intelc.py
index dea5b92..b4a3c90 100644
--- a/src/engine/SCons/Tool/intelc.py
+++ b/src/engine/SCons/Tool/intelc.py
@@ -245,7 +245,11 @@ def get_all_compiler_versions():
m = re.search(r'([0-9][0-9.]*)$', d)
if m:
versions.append(m.group(1))
- return sorted(uniquify(versions)) # remove dups
+ def keyfunc(str):
+ """Given a dot-separated version string, return a tuple of ints representing it."""
+ return [int(x) for x in str.split('.')]
+ # split into ints, sort, then remove dups
+ return sorted(uniquify(versions), key=keyfunc, reverse=True)
def get_intel_compiler_top(version, abi):
"""