Skip to content

Commit 1e0a211

Browse files
author
Steven Noonan
committed
CMakeLists: indent push/pop check state blocks, NFC
For readability. Signed-off-by: Steven Noonan <[email protected]>
1 parent 1d11919 commit 1e0a211

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

CMakeLists.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ if (WIN32)
7474
# Check whether BCrypt can be used with this SDK version
7575
#
7676
cmake_push_check_state()
77-
set(CMAKE_REQUIRED_LIBRARIES bcrypt)
78-
check_symbol_exists(BCryptEncrypt windows.h BCRYPT_AVAILABLE)
77+
set(CMAKE_REQUIRED_LIBRARIES bcrypt)
78+
check_symbol_exists(BCryptEncrypt windows.h BCRYPT_AVAILABLE)
7979
cmake_pop_check_state()
8080
if (NOT BCRYPT_AVAILABLE AND USE_CRYPTO STREQUAL "BCrypt")
8181
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")
107107
# Ensure the OpenSSL version is recent enough. We need a bunch of EVP
108108
# functionality.
109109
cmake_push_check_state()
110-
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
111-
set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto)
112-
if(WIN32 AND OPENSSL_USE_STATIC_LIBS)
113-
list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32)
114-
endif()
115-
check_symbol_exists(EVP_MD_CTX_free openssl/evp.h OPENSSL_NEW_ENOUGH)
116-
if (NOT OPENSSL_NEW_ENOUGH)
117-
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.")
118-
endif()
110+
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
111+
set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto)
112+
if(WIN32 AND OPENSSL_USE_STATIC_LIBS)
113+
list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32)
114+
endif()
115+
check_symbol_exists(EVP_MD_CTX_free openssl/evp.h OPENSSL_NEW_ENOUGH)
116+
if (NOT OPENSSL_NEW_ENOUGH)
117+
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.")
118+
endif()
119119
cmake_pop_check_state()
120120
cmake_push_check_state()
121-
set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto)
122-
if(WIN32 AND OPENSSL_USE_STATIC_LIBS)
123-
list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32)
124-
endif()
125-
if(USE_CRYPTO25519 STREQUAL "OpenSSL")
126-
check_symbol_exists(EVP_PKEY_get_raw_public_key openssl/evp.h OPENSSL_HAS_25519_RAW)
127-
endif()
121+
set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto)
122+
if(WIN32 AND OPENSSL_USE_STATIC_LIBS)
123+
list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32)
124+
endif()
125+
if(USE_CRYPTO25519 STREQUAL "OpenSSL")
126+
check_symbol_exists(EVP_PKEY_get_raw_public_key openssl/evp.h OPENSSL_HAS_25519_RAW)
127+
endif()
128128
cmake_pop_check_state()
129129
endif()
130130

0 commit comments

Comments
 (0)