Skip to content

Commit

Permalink
cmake: fix exec_program() warning on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
darkk committed Sep 27, 2024
1 parent 86e33e0 commit 69ad0f2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ endif()
# TODO: rather parse `$CC -march=native -dM -E - <<< ''` [GH #10]
if(NOT CMAKE_CROSSCOMPILING)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
exec_program(
cat ARGS
"/proc/cpuinfo"
OUTPUT_VARIABLE CPUINFO)
file(READ "/proc/cpuinfo" CPUINFO)
string(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE "${CPUINFO}")
string(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE)
string(REGEX REPLACE "^.*(sse4_2).*$" "\\1" SSE_THERE "${CPUINFO}")
Expand Down

0 comments on commit 69ad0f2

Please sign in to comment.