1. dubcanada
  2. SCons


Gary Oberbrunner  committed 48c8f41

Fix intel compiler to sort versions >9 correctly (esp. on Linux)

  • Participants
  • Parent commits b963a42
  • Branches default

Comments (0)

Files changed (1)

File src/engine/SCons/Tool/intelc.py

View file
             m = re.search(r'([0-9][0-9.]*)$', d)
             if m:
-    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):