Skip to content

Commit

Permalink
[CMake] fix x86 CPU detection on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTumultuousUnicornOfDarkness committed Oct 7, 2024
1 parent 54364ed commit e0e07bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ option(WITH_OPENCL "Use OpenCL library"
option(WITH_LIBPROCPS "Use Libprocps library" ON)
option(WITH_LIBSTATGRAB "Use Libstatgrab library" ON)
option(WITH_DMIDECODE "Built-in Dmidecode" ON)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
option(WITH_BANDWIDTH "Built-in Bandwidth" ON) # Bandwidth is only supported on x86 CPUs (requires cache size)
else()
set(WITH_BANDWIDTH OFF)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
option(FORCE_LIBSTATGRAB "Force use of Libstatgrab instead of Libprocps (GNU/Linux system)" OFF)
option(FLATPAK "Enable workarounds for Flatpak" OFF)

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ if(WITH_DMIDECODE)
endif(WITH_DMIDECODE)

# Bandwidth
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86" AND WITH_BANDWIDTH)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND WITH_BANDWIDTH)
add_subdirectory(bandwidth)
if(BANDWIDTH_FOUND)
include_directories(bandwidth)
set(BANDWIDTH_LIBRARIES "bandwidth")
endif(BANDWIDTH_FOUND)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86" AND WITH_BANDWIDTH)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND WITH_BANDWIDTH)


### FINAL CONFIG
Expand Down

0 comments on commit e0e07bd

Please sign in to comment.