From 0e45bb8ee956814167ecead95fd9e76b2295c435 Mon Sep 17 00:00:00 2001 From: Nicolas Hake Date: Sun, 25 Feb 2018 11:18:24 +0100 Subject: [PATCH] Enable SSE2 for BLAKE2 library --- thirdparty/blake2/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/thirdparty/blake2/CMakeLists.txt b/thirdparty/blake2/CMakeLists.txt index 7cdd2b045..0292edee1 100644 --- a/thirdparty/blake2/CMakeLists.txt +++ b/thirdparty/blake2/CMakeLists.txt @@ -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})