cmake: add RAIBLOCKS_SIMD_OPTIMIZATIONS flag
This commit is contained in:
parent
7a3153966e
commit
1365ea50d1
1 changed files with 7 additions and 2 deletions
|
@ -8,6 +8,8 @@ set (CPACK_PACKAGE_VERSION_PATCH "0")
|
|||
set (RAIBLOCKS_GUI OFF CACHE BOOL "")
|
||||
set (RAIBLOCKS_TEST OFF CACHE BOOL "")
|
||||
|
||||
option(RAIBLOCKS_SIMD_OPTIMIZATIONS "Enable CPU-specific SIMD optimizations (SSE/AVX or NEON, e.g.)" ON)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
|
@ -18,7 +20,10 @@ if (WIN32)
|
|||
else (WIN32)
|
||||
set (PLATFORM_COMPILE_FLAGS "-DBOOST_SPIRIT_THREADSAFE -Werror=switch -fPIC")
|
||||
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$")
|
||||
set (PLATFORM_COMPILE_FLAGS "${PLATFORM_COMPILE_FLAGS} -msse4")
|
||||
if (RAIBLOCKS_SIMD_OPTIMIZATIONS)
|
||||
set (PLATFORM_COMPILE_FLAGS "${PLATFORM_COMPILE_FLAGS} -msse4")
|
||||
endif()
|
||||
|
||||
set (BLAKE2_IMPLEMENTATION "blake2/blake2b.c")
|
||||
if (ENABLE_AVX2)
|
||||
set (PLATFORM_COMPILE_FLAGS "${PLATFORM_COMPILE_FLAGS} -mavx2 -mbmi -mbmi2")
|
||||
|
@ -106,7 +111,7 @@ include_directories (miniupnp/miniupnpc)
|
|||
set (BUILD_SHARED OFF CACHE BOOL "")
|
||||
set (BUILD_TESTING OFF CACHE BOOL "")
|
||||
set (USE_INTERMEDIATE_OBJECTS_TARGET OFF CACHE BOOL "")
|
||||
if (CRYPTOPP_CUSTOM)
|
||||
if (CRYPTOPP_CUSTOM OR NOT RAIBLOCKS_SIMD_OPTIMIZATIONS)
|
||||
set (CRYPTOPP_LIBRARY cryptopp)
|
||||
add_library (cryptopp
|
||||
cryptopp/algparam.cpp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue