Skip to content

CMake module for check whether a SSE nstructions can be used on the machine.

Notifications You must be signed in to change notification settings

hideo55/CMake-FindSSE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

FindSSE.cmake

CMake module for check whether a SSE instructions can be used on the machine.

  • Supports SSE2/SSE3/SSSE3/SSE4.1/SSE4.2
  • Supports check GCC version(-msse4.2 can use on GCC 4.3 or later)

Usage

SET (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

INCLUDE(FindSSE)
FindSSE ()
IF(SSE3_FOUND)
    IF(SSSE3_FOUND)
            SET(CXX_DFLAGS -msse3 -mssse3)
    ENDIF(SSSE3_FOUND)
ENDIF(SSE3_FOUND)

IF(SSE4_2_FOUND)
        SET(CXX_DFLAGS -msse4.2 -mpopcnt)
ENDIF(SSE4_2_FOUND)
ADD_DEFINITIONS(${CXX_DFLAGS})

Variables

  • SSE2_FOUND
  • SSE3_FOUND
  • SSSE3_FOUND
  • SSE4_1_FOUND
  • SSE4_2_FOUND

About

CMake module for check whether a SSE nstructions can be used on the machine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages