CMake: build RDRAND only for X86/X32/X64

pull/424/head
anonimal 2017-05-16 22:25:40 +00:00
parent a59e32be73
commit 947c96680a
No known key found for this signature in database
GPG Key ID: 66A76ECF914409F1
1 changed files with 7 additions and 0 deletions

View File

@ -294,6 +294,7 @@ list(REMOVE_ITEM cryptopp_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/integer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp
${CMAKE_CURRENT_SOURCE_DIR}/simple.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rdrand.cpp
${CMAKE_CURRENT_SOURCE_DIR}/winpipes.cpp
${CMAKE_CURRENT_SOURCE_DIR}/cryptlib_bds.cpp
${cryptopp_SOURCES_TEST}
@ -305,6 +306,12 @@ set(cryptopp_SOURCES
${cryptopp_SOURCES}
)
string(REGEX MATCH "i.86|x86|i86|_64|d64" PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
if (NOT "${PROCESSOR}" STREQUAL "")
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/rdrand.cpp)
endif()
if(MINGW OR WIN32)
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/winpipes.cpp)
endif()