From 1e0a211d2ea77c5bb9f2c992958b9b093e6bc05e Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Thu, 3 Sep 2020 16:25:13 -0700 Subject: [PATCH] CMakeLists: indent push/pop check state blocks, NFC For readability. Signed-off-by: Steven Noonan --- CMakeLists.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fcb03984..3fd81b3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,8 +74,8 @@ if (WIN32) # Check whether BCrypt can be used with this SDK version # cmake_push_check_state() - set(CMAKE_REQUIRED_LIBRARIES bcrypt) - check_symbol_exists(BCryptEncrypt windows.h BCRYPT_AVAILABLE) + set(CMAKE_REQUIRED_LIBRARIES bcrypt) + check_symbol_exists(BCryptEncrypt windows.h BCRYPT_AVAILABLE) cmake_pop_check_state() if (NOT BCRYPT_AVAILABLE AND USE_CRYPTO STREQUAL "BCrypt") message(FATAL_ERROR "You're on Windows but BCrypt seems to be unavailable, you will need OpenSSL") @@ -107,24 +107,24 @@ if (USE_CRYPTO25519 STREQUAL "OpenSSL" OR USE_CRYPTO STREQUAL "OpenSSL") # Ensure the OpenSSL version is recent enough. We need a bunch of EVP # functionality. cmake_push_check_state() - set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) - if(WIN32 AND OPENSSL_USE_STATIC_LIBS) - list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32) - endif() - check_symbol_exists(EVP_MD_CTX_free openssl/evp.h OPENSSL_NEW_ENOUGH) - if (NOT OPENSSL_NEW_ENOUGH) - message(FATAL_ERROR "Cannot find EVP_MD_CTX_free in OpenSSL headers/libs for the target architecture. Check that you're using OpenSSL 1.1.0 or later.") - endif() + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + if(WIN32 AND OPENSSL_USE_STATIC_LIBS) + list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32) + endif() + check_symbol_exists(EVP_MD_CTX_free openssl/evp.h OPENSSL_NEW_ENOUGH) + if (NOT OPENSSL_NEW_ENOUGH) + message(FATAL_ERROR "Cannot find EVP_MD_CTX_free in OpenSSL headers/libs for the target architecture. Check that you're using OpenSSL 1.1.0 or later.") + endif() cmake_pop_check_state() cmake_push_check_state() - set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) - if(WIN32 AND OPENSSL_USE_STATIC_LIBS) - list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32) - endif() - if(USE_CRYPTO25519 STREQUAL "OpenSSL") - check_symbol_exists(EVP_PKEY_get_raw_public_key openssl/evp.h OPENSSL_HAS_25519_RAW) - endif() + set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + if(WIN32 AND OPENSSL_USE_STATIC_LIBS) + list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32) + endif() + if(USE_CRYPTO25519 STREQUAL "OpenSSL") + check_symbol_exists(EVP_PKEY_get_raw_public_key openssl/evp.h OPENSSL_HAS_25519_RAW) + endif() cmake_pop_check_state() endif()