diff options
Diffstat (limited to 'src/engine/SCons/Tool/intelc.py')
-rw-r--r-- | src/engine/SCons/Tool/intelc.py | 6 |
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): """ |