diff options
author | Wolfgang Schupp <w.schupp@a1.net> | 2017-02-15 20:53:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-15 20:53:40 +0100 |
commit | a1bf5b14cd87b92d7a79128c14a230ea18f28a92 (patch) | |
tree | ac758680cb0e759ae35de360322891a8d0756a5f | |
parent | 7bd893ed2290886b1ce7502ebe07060660f506a5 (diff) | |
parent | 6b46b3313eb5bbccc06adf5f89e27b9c2fe9f9ab (diff) |
Merge pull request #11631 from anthonyryan1/sse3
Update SSE3 check to match with the others
-rw-r--r-- | cmake/modules/FindSSE.cmake | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cmake/modules/FindSSE.cmake b/cmake/modules/FindSSE.cmake index 055466367b..ba9fb541ed 100644 --- a/cmake/modules/FindSSE.cmake +++ b/cmake/modules/FindSSE.cmake @@ -14,13 +14,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") string(COMPARE EQUAL "sse2" "${_SSE_THERE}" _SSE2_TRUE) CHECK_CXX_ACCEPTS_FLAG("-msse2" _SSE2_OK) - # /proc/cpuinfo apparently omits sse3 :( - string(REGEX REPLACE "^.*[^s](sse3).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "sse3" "${_SSE_THERE}" _SSE3_TRUE) - if(NOT _SSE3_TRUE) - string(REGEX REPLACE "^.*(T2300).*$" "\\1" _SSE_THERE ${CPUINFO}) - string(COMPARE EQUAL "T2300" "${_SSE_THERE}" _SSE3_TRUE) - endif() + # SSE3 is also known as the Prescott New Instructions (PNI) + # it's labeled as pni in /proc/cpuinfo + string(REGEX REPLACE "^.*(pni).*$" "\\1" _SSE_THERE ${CPUINFO}) + string(COMPARE EQUAL "pni" "${_SSE_THERE}" _SSE3_TRUE) CHECK_CXX_ACCEPTS_FLAG("-msse3" _SSE3_OK) string(REGEX REPLACE "^.*(ssse3).*$" "\\1" _SSE_THERE ${CPUINFO}) |