Skip to content

Commit 92e047c

Browse files
committed
wait, i think the callback has to be a function, not a macro...
1 parent d06da05 commit 92e047c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ set(BORINGSSL_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/extern/boringssl/include)
5353

5454
# we must empower ourselves with the spells necessary to block _all further mutation_ to a variable
5555

56-
macro(protect_variable_callback variable access value current_list_file stack)
56+
function(protect_variable_callback variable access value current_list_file stack)
5757
if(access STREQUAL "MODIFIED_ACCESS")
5858
set(${variable} "${_PROTECTED_${variable}_VALUE}" CACHE INTERNAL "Protected variable" FORCE)
5959
message(WARNING "Attempt to modify protected variable ${variable} was blocked (in ${current_list_file})")
6060
endif()
61-
endmacro()
61+
endfunction()
6262

6363
function(set_protected_variable var_name value)
6464
set(_PROTECTED_${var_name}_VALUE "${value}" CACHE INTERNAL "")
@@ -69,8 +69,8 @@ endfunction()
6969
# Path to the actual files
7070

7171
# find_package is an evil demon, and we must use powerful spells to bind it
72-
set_protected_variable(OPENSSL_SSL_LIBRARY "${BORINGSSL_OUTPUT_DIR}/libssl${LIB_EXT}" CACHE FILEPATH "" FORCE)
73-
set_protected_variable(OPENSSL_CRYPTO_LIBRARY "${BORINGSSL_OUTPUT_DIR}/libcrypto${LIB_EXT}" CACHE INTERNAL FILEPATH "" FORCE)
72+
set_protected_variable(OPENSSL_SSL_LIBRARY "${BORINGSSL_OUTPUT_DIR}/libssl${LIB_EXT}")
73+
set_protected_variable(OPENSSL_CRYPTO_LIBRARY "${BORINGSSL_OUTPUT_DIR}/libcrypto${LIB_EXT}")
7474
set(OPENSSL_LIBRARIES "${OPENSSL_SSL_LIBRARY};${OPENSSL_CRYPTO_LIBRARY}" CACHE STRING "" FORCE)
7575

7676
add_library(OpenSSL::SSL STATIC IMPORTED GLOBAL)

0 commit comments

Comments
 (0)