vcpkg/ports/s2n/remove-trycompile.patch
2023-02-01 12:52:03 -08:00

60 lines
2.1 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt (revision 4aec93c6a74aacf60cec6229b35094f56cb0f87b)
+++ b/CMakeLists.txt (date 1675010024800)
@@ -393,55 +393,6 @@
message(STATUS "Enabling libcrypto interning")
endif()
-# Determine if EVP_md5_sha1 is available in libcrypto
-try_compile(
- LIBCRYPTO_SUPPORTS_EVP_MD5_SHA1_HASH
- ${CMAKE_BINARY_DIR}
- SOURCES "${CMAKE_CURRENT_LIST_DIR}/tests/features/evp_md5_sha1.c"
- LINK_LIBRARIES ${LINK_LIB} ${OS_LIBS}
-)
-if (LIBCRYPTO_SUPPORTS_EVP_MD5_SHA1_HASH)
- target_compile_options(${PROJECT_NAME} PUBLIC -DS2N_LIBCRYPTO_SUPPORTS_EVP_MD5_SHA1_HASH)
-endif()
-
-# Determine if RC4 is available in libcrypto
-try_compile(
- LIBCRYPTO_SUPPORTS_EVP_RC4
- ${CMAKE_BINARY_DIR}
- SOURCES "${CMAKE_CURRENT_LIST_DIR}/tests/features/evp_rc4.c"
- LINK_LIBRARIES ${LINK_LIB} ${OS_LIBS}
-)
-
-if (LIBCRYPTO_SUPPORTS_EVP_RC4)
- target_compile_options(${PROJECT_NAME} PUBLIC -DS2N_LIBCRYPTO_SUPPORTS_EVP_RC4)
-endif()
-
-# Determine if EVP_MD_CTX_set_pkey_ctx is available in libcrypto
-try_compile(
- LIBCRYPTO_SUPPORTS_EVP_MD_CTX_SET_PKEY_CTX
- ${CMAKE_BINARY_DIR}
- SOURCES "${CMAKE_CURRENT_LIST_DIR}/tests/features/evp_md_ctx_set_pkey_ctx.c"
- LINK_LIBRARIES ${LINK_LIB} ${OS_LIBS}
- CMAKE_FLAGS ${ADDITIONAL_FLAGS}
-)
-
-if (LIBCRYPTO_SUPPORTS_EVP_MD_CTX_SET_PKEY_CTX)
- target_compile_options(${PROJECT_NAME} PUBLIC -DS2N_LIBCRYPTO_SUPPORTS_EVP_MD_CTX_SET_PKEY_CTX)
-endif()
-
-# Determine if Kyber512 implementation from AWS-LC is available
-try_compile(
- LIBCRYPTO_SUPPORTS_EVP_KYBER_512
- ${CMAKE_BINARY_DIR}
- SOURCES "${CMAKE_CURRENT_LIST_DIR}/tests/features/evp_kyber_512.c"
- LINK_LIBRARIES ${LINK_LIB} ${OS_LIBS}
- COMPILE_DEFINITIONS "-Werror"
-)
-
-if(S2N_AWSLC_KYBER_UNSTABLE AND LIBCRYPTO_SUPPORTS_EVP_KYBER_512)
- target_compile_options(${PROJECT_NAME} PUBLIC -DS2N_LIBCRYPTO_SUPPORTS_KYBER512)
-endif()
-
if (NOT DEFINED CMAKE_AR)
message(STATUS "CMAKE_AR undefined, setting to `ar` by default")
SET(CMAKE_AR ar)