fix cmake crypto++
This commit is contained in:
parent
7b742f41e3
commit
8c189c9ace
@ -4,6 +4,9 @@ Fixed bugs:
|
|||||||
* If file system migration encounters files or folders with the wrong format in the base directory, it now just ignores them instead of crashing.
|
* If file system migration encounters files or folders with the wrong format in the base directory, it now just ignores them instead of crashing.
|
||||||
* When trying to migrate a file system from CryFS 0.9.3 or older, show an error message suggesting to first open it with 0.9.10 because we can't load that anymore.
|
* When trying to migrate a file system from CryFS 0.9.3 or older, show an error message suggesting to first open it with 0.9.10 because we can't load that anymore.
|
||||||
|
|
||||||
|
Other:
|
||||||
|
* Updated to crypto++ 8.1
|
||||||
|
|
||||||
|
|
||||||
Version 0.10.0
|
Version 0.10.0
|
||||||
---------------
|
---------------
|
||||||
|
2
vendor/README
vendored
2
vendor/README
vendored
@ -3,5 +3,5 @@ googletest: https://github.com/google/googletest/tree/4e4df226fc197c0dda6e37f5c8
|
|||||||
- changed: added NOLINT comment as workaround for clang-tidy warning https://github.com/google/googletest/issues/853
|
- changed: added NOLINT comment as workaround for clang-tidy warning https://github.com/google/googletest/issues/853
|
||||||
spdlog: https://github.com/gabime/spdlog/tree/v0.16.3/include/spdlog
|
spdlog: https://github.com/gabime/spdlog/tree/v0.16.3/include/spdlog
|
||||||
cryptopp: https://github.com/weidai11/cryptopp/tree/CRYPTOPP_8_1_0
|
cryptopp: https://github.com/weidai11/cryptopp/tree/CRYPTOPP_8_1_0
|
||||||
- changed: added CMakeLists.txt and cryptopp-config.cmake from https://github.com/noloader/cryptopp-cmake/tree/CRYPTOPP_8_0_0
|
- changed: added CMakeLists.txt and cryptopp-config.cmake from https://github.com/noloader/cryptopp-cmake/tree/07a064d57d97477cb055f994a498f45425df0c1d
|
||||||
- changed: commented out line including winapifamily.h in CMakeLists.txt
|
- changed: commented out line including winapifamily.h in CMakeLists.txt
|
||||||
|
55
vendor/cryptopp/vendor_cryptopp/CMakeLists.txt
vendored
55
vendor/cryptopp/vendor_cryptopp/CMakeLists.txt
vendored
@ -17,13 +17,13 @@ if(NOT DEFINED cryptocpp_DISPLAY_CMAKE_SUPPORT_WARNING)
|
|||||||
endif()
|
endif()
|
||||||
if(cryptocpp_DISPLAY_CMAKE_SUPPORT_WARNING)
|
if(cryptocpp_DISPLAY_CMAKE_SUPPORT_WARNING)
|
||||||
message( STATUS
|
message( STATUS
|
||||||
"*************************************************************************\n"
|
"*************************************************************************\n"
|
||||||
"The Crypto++ library does not officially support CMake. CMake support is a\n"
|
"The Crypto++ library does not officially support CMake. CMake support is a\n"
|
||||||
"community effort, and the library works with the folks using CMake to help\n"
|
"community effort, and the library works with the folks using CMake to help\n"
|
||||||
"improve it. If you find an issue then please fix it or report it at\n"
|
"improve it. If you find an issue then please fix it or report it at\n"
|
||||||
"https://github.com/noloader/cryptopp-cmake.\n"
|
"https://github.com/noloader/cryptopp-cmake.\n"
|
||||||
"-- *************************************************************************"
|
"-- *************************************************************************"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Print useful information
|
# Print useful information
|
||||||
@ -623,40 +623,60 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU
|
|||||||
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_MIXED_ASM")
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_MIXED_ASM")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (CRYPTOPP_IA32_SSE2 AND NOT DISABLE_ASM)
|
if (NOT CRYPTOPP_IA32_SSE2 AND NOT DISABLE_ASM)
|
||||||
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_ASM")
|
||||||
|
elseif (CRYPTOPP_IA32_SSE2 AND NOT DISABLE_ASM)
|
||||||
set_source_files_properties(${SRC_DIR}/sse_simd.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
set_source_files_properties(${SRC_DIR}/sse_simd.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
||||||
set_source_files_properties(${SRC_DIR}/chacha_simd.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
set_source_files_properties(${SRC_DIR}/chacha_simd.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
||||||
set_source_files_properties(${SRC_DIR}/donna_sse.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
set_source_files_properties(${SRC_DIR}/donna_sse.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
||||||
endif ()
|
endif ()
|
||||||
if (CRYPTOPP_IA32_SSSE3 AND NOT DISABLE_SSSE3)
|
if (NOT CRYPTOPP_IA32_SSSE3 AND NOT DISABLE_SSSE3)
|
||||||
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SSSE3")
|
||||||
|
elseif (CRYPTOPP_IA32_SSSE3 AND NOT DISABLE_SSSE3)
|
||||||
set_source_files_properties(${SRC_DIR}/aria_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
set_source_files_properties(${SRC_DIR}/aria_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||||
set_source_files_properties(${SRC_DIR}/cham_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
set_source_files_properties(${SRC_DIR}/cham_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||||
|
set_source_files_properties(${SRC_DIR}/keccak_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||||
set_source_files_properties(${SRC_DIR}/lea_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
set_source_files_properties(${SRC_DIR}/lea_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||||
set_source_files_properties(${SRC_DIR}/simeck_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
set_source_files_properties(${SRC_DIR}/simeck_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||||
set_source_files_properties(${SRC_DIR}/simon128_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
set_source_files_properties(${SRC_DIR}/simon128_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||||
set_source_files_properties(${SRC_DIR}/speck128_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
set_source_files_properties(${SRC_DIR}/speck128_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||||
if (CRYPTOPP_IA32_SSE41 AND NOT DISABLE_SSE4)
|
if (NOT CRYPTOPP_IA32_SSE41 AND NOT DISABLE_SSE4)
|
||||||
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SSE4")
|
||||||
|
elseif (CRYPTOPP_IA32_SSE41 AND NOT DISABLE_SSE4)
|
||||||
set_source_files_properties(${SRC_DIR}/blake2s_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
set_source_files_properties(${SRC_DIR}/blake2s_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
||||||
set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
||||||
set_source_files_properties(${SRC_DIR}/simon64_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
set_source_files_properties(${SRC_DIR}/simon64_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
||||||
set_source_files_properties(${SRC_DIR}/speck64_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
set_source_files_properties(${SRC_DIR}/speck64_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
||||||
endif ()
|
endif ()
|
||||||
if (CRYPTOPP_IA32_SSE42 AND NOT DISABLE_SSE4)
|
if (NOT CRYPTOPP_IA32_SSE42 AND NOT DISABLE_SSE4)
|
||||||
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SSE4")
|
||||||
|
elseif (CRYPTOPP_IA32_SSE42 AND NOT DISABLE_SSE4)
|
||||||
set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2")
|
set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2")
|
||||||
if (CRYPTOPP_IA32_CLMUL AND NOT DISABLE_AES)
|
if (NOT CRYPTOPP_IA32_CLMUL AND NOT DISABLE_AES)
|
||||||
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_CLMUL")
|
||||||
|
elseif (CRYPTOPP_IA32_CLMUL AND NOT DISABLE_AES)
|
||||||
set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3 -mpclmul")
|
set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3 -mpclmul")
|
||||||
|
set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS "-mpclmul")
|
||||||
endif ()
|
endif ()
|
||||||
if (CRYPTOPP_IA32_AES AND NOT DISABLE_AES)
|
if (NOT CRYPTOPP_IA32_AES AND NOT DISABLE_AES)
|
||||||
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_AESNI")
|
||||||
|
elseif (CRYPTOPP_IA32_AES AND NOT DISABLE_AES)
|
||||||
set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1 -maes")
|
set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1 -maes")
|
||||||
set_source_files_properties(${SRC_DIR}/sm4_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3 -maes")
|
set_source_files_properties(${SRC_DIR}/sm4_simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3 -maes")
|
||||||
endif ()
|
endif ()
|
||||||
#if (CRYPTOPP_IA32_AVX AND NOT DISABLE_AVX)
|
#if (NOT CRYPTOPP_IA32_AVX AND NOT DISABLE_AVX)
|
||||||
|
# list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_AVX")
|
||||||
|
#elseif (CRYPTOPP_IA32_AVX AND NOT DISABLE_AVX)
|
||||||
# set_source_files_properties(${SRC_DIR}/XXX_avx.cpp PROPERTIES COMPILE_FLAGS "-mavx")
|
# set_source_files_properties(${SRC_DIR}/XXX_avx.cpp PROPERTIES COMPILE_FLAGS "-mavx")
|
||||||
#endif ()
|
#endif ()
|
||||||
if (CRYPTOPP_IA32_AVX2 AND NOT DISABLE_AVX2)
|
if (NOT CRYPTOPP_IA32_AVX2 AND NOT DISABLE_AVX2)
|
||||||
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_AVX2")
|
||||||
|
elseif (CRYPTOPP_IA32_AVX2 AND NOT DISABLE_AVX2)
|
||||||
set_source_files_properties(${SRC_DIR}/chacha_avx.cpp PROPERTIES COMPILE_FLAGS "-mavx2")
|
set_source_files_properties(${SRC_DIR}/chacha_avx.cpp PROPERTIES COMPILE_FLAGS "-mavx2")
|
||||||
endif ()
|
endif ()
|
||||||
if (CRYPTOPP_IA32_SHA AND NOT DISABLE_SHA)
|
if (NOT CRYPTOPP_IA32_SHA AND NOT DISABLE_SHA)
|
||||||
|
list(APPEND CRYPTOPP_COMPILE_OPTIONS "-DCRYPTOPP_DISABLE_SHANI")
|
||||||
|
elseif (CRYPTOPP_IA32_SHA AND NOT DISABLE_SHA)
|
||||||
set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
||||||
set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
||||||
endif ()
|
endif ()
|
||||||
@ -689,6 +709,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU
|
|||||||
endif ()
|
endif ()
|
||||||
if (CRYPTOPP_ARMV8A_CRYPTO)
|
if (CRYPTOPP_ARMV8A_CRYPTO)
|
||||||
set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
||||||
|
set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
||||||
set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
||||||
set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
||||||
set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
||||||
@ -806,6 +827,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU
|
|||||||
set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
set_source_files_properties(${SRC_DIR}/blake2b_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
||||||
#set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
#set_source_files_properties(${SRC_DIR}/crc_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
||||||
set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
||||||
|
set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
||||||
set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
||||||
set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
set_source_files_properties(${SRC_DIR}/sha_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
||||||
set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
set_source_files_properties(${SRC_DIR}/shacal2_simd.cpp PROPERTIES COMPILE_FLAGS ${CRYPTOPP_POWER8_FLAGS})
|
||||||
@ -911,6 +933,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
|||||||
set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=sse4_2")
|
set(XARCH_LDFLAGS "${XARCH_LDFLAGS} -xarch=sse4_2")
|
||||||
if (CRYPTOPP_IA32_CLMUL AND NOT DISABLE_CLMUL)
|
if (CRYPTOPP_IA32_CLMUL AND NOT DISABLE_CLMUL)
|
||||||
set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes")
|
set_source_files_properties(${SRC_DIR}/gcm_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes")
|
||||||
|
set_source_files_properties(${SRC_DIR}/gf2n_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes")
|
||||||
endif ()
|
endif ()
|
||||||
if (CRYPTOPP_IA32_AES AND NOT DISABLE_AES)
|
if (CRYPTOPP_IA32_AES AND NOT DISABLE_AES)
|
||||||
set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes")
|
set_source_files_properties(${SRC_DIR}/rijndael_simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user