Enable SSE2 for BLAKE2 library

master
Nicolas Hake 2018-02-25 11:18:24 +01:00
parent 0c12b02727
commit 701adc2eae
1 changed files with 5 additions and 0 deletions

View File

@ -34,5 +34,10 @@ target_sources(blake2
blake2-impl.h
)
include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG("-msse2" HAVE_CFLAG_MSSE2)
target_compile_definitions(blake2 PRIVATE -DHAVE_SSE2)
if(HAVE_CFLAG_MSSE2)
target_compile_options(blake2 PUBLIC -msse2)
endif()
target_include_directories(blake2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})