Skip to content

Commit

Permalink
Convert hex to decimal as it confuses cmake on Windows
Browse files Browse the repository at this point in the history
Refs: gh-119
Signed-off-by: Matthias Kretz <kretz@kde.org>
  • Loading branch information
mattkretz committed Apr 13, 2016
1 parent 2eac10d commit 6312b68
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions cmake/OptimizeForArchitecture.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,38 +107,33 @@ macro(AutodetectHostArchitecture)
# 4E | Skylake Client
# 3C | Broadwell (likely a bug in the SDE)
# 3C | Haswell
if(_cpu_model EQUAL 0x57)
if(_cpu_model EQUAL 87)
set(TARGET_ARCHITECTURE "knl") # Knights Landing
elseif(_cpu_model EQUAL 0x5C)
elseif(_cpu_model EQUAL 92)
set(TARGET_ARCHITECTURE "goldmont")
elseif(_cpu_model EQUAL 0x5A)
elseif(_cpu_model EQUAL 90)
set(TARGET_ARCHITECTURE "silvermont")
elseif(_cpu_model EQUAL 0x66)
elseif(_cpu_model EQUAL 102)
set(TARGET_ARCHITECTURE "cannonlake")
elseif(_cpu_model EQUAL 85) # 55
set(TARGET_ARCHITECTURE "skylake-xeon")
elseif(_cpu_model EQUAL 78 OR _cpu_model EQUAL 94) # 4E, 5E
set(TARGET_ARCHITECTURE "skylake")
elseif(_cpu_model EQUAL 0x3D OR _cpu_model EQUAL 0x47 OR _cpu_model EQUAL 0x56)
elseif(_cpu_model EQUAL 61 OR _cpu_model EQUAL 71 OR _cpu_model EQUAL 86)
set(TARGET_ARCHITECTURE "broadwell")
elseif(_cpu_model EQUAL 0x3C
OR _cpu_model EQUAL 0x45
OR _cpu_model EQUAL 0x46
OR _cpu_model EQUAL 0x3F
OR _cpu_model EQUAL 63 # this is equal to 0x3F, but maybe it fixes a Windows issue
)
elseif(_cpu_model EQUAL 60 OR _cpu_model EQUAL 69 OR _cpu_model EQUAL 70 OR _cpu_model EQUAL 63)
set(TARGET_ARCHITECTURE "haswell")
elseif(_cpu_model EQUAL 0x3A OR _cpu_model EQUAL 0x3E)
elseif(_cpu_model EQUAL 58 OR _cpu_model EQUAL 62)
set(TARGET_ARCHITECTURE "ivy-bridge")
elseif(_cpu_model EQUAL 0x2A OR _cpu_model EQUAL 0x2D)
elseif(_cpu_model EQUAL 42 OR _cpu_model EQUAL 45)
set(TARGET_ARCHITECTURE "sandy-bridge")
elseif(_cpu_model EQUAL 0x25 OR _cpu_model EQUAL 0x2C OR _cpu_model EQUAL 0x2F)
elseif(_cpu_model EQUAL 37 OR _cpu_model EQUAL 44 OR _cpu_model EQUAL 47)
set(TARGET_ARCHITECTURE "westmere")
elseif(_cpu_model EQUAL 0x1A OR _cpu_model EQUAL 0x1E OR _cpu_model EQUAL 0x1F OR _cpu_model EQUAL 0x2E)
elseif(_cpu_model EQUAL 26 OR _cpu_model EQUAL 30 OR _cpu_model EQUAL 31 OR _cpu_model EQUAL 46)
set(TARGET_ARCHITECTURE "nehalem")
elseif(_cpu_model EQUAL 0x17 OR _cpu_model EQUAL 0x1D)
elseif(_cpu_model EQUAL 23 OR _cpu_model EQUAL 29)
set(TARGET_ARCHITECTURE "penryn")
elseif(_cpu_model EQUAL 0x0F)
elseif(_cpu_model EQUAL 15)
set(TARGET_ARCHITECTURE "merom")
elseif(_cpu_model EQUAL 28)
set(TARGET_ARCHITECTURE "atom")
Expand Down

0 comments on commit 6312b68

Please sign in to comment.