mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Pass config file options to mbedtls_test(_helpers)
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@ -118,6 +118,14 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|||||||
FORCE)
|
FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# If set, make MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE into PATHs
|
||||||
|
if(DEFINED MBEDTLS_CONFIG_FILE)
|
||||||
|
set(MBEDTLS_CONFIG_FILE "" CACHE PATH "Mbed TLS config file (overrides default).")
|
||||||
|
endif()
|
||||||
|
if(DEFINED MBEDTLS_USER_CONFIG_FILE)
|
||||||
|
set(MBEDTLS_USER_CONFIG_FILE "" CACHE PATH "Mbed TLS user config file (appended to default).")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Create a symbolic link from ${base_name} in the binary directory
|
# Create a symbolic link from ${base_name} in the binary directory
|
||||||
# to the corresponding path in the source directory.
|
# to the corresponding path in the source directory.
|
||||||
# Note: Copies the file(s) on Windows.
|
# Note: Copies the file(s) on Windows.
|
||||||
@ -297,6 +305,20 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
|
|||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/everest/include)
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/everest/include)
|
||||||
|
|
||||||
|
# Pass-through MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE
|
||||||
|
if(DEFINED MBEDTLS_CONFIG_FILE)
|
||||||
|
target_compile_definitions(mbedtls_test
|
||||||
|
PUBLIC MBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}")
|
||||||
|
target_compile_definitions(mbedtls_test_helpers
|
||||||
|
PUBLIC MBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}")
|
||||||
|
endif()
|
||||||
|
if(DEFINED MBEDTLS_USER_CONFIG_FILE)
|
||||||
|
target_compile_definitions(mbedtls_test
|
||||||
|
PUBLIC MBEDTLS_USER_CONFIG_FILE="${MBEDTLS_USER_CONFIG_FILE}")
|
||||||
|
target_compile_definitions(mbedtls_test_helpers
|
||||||
|
PUBLIC MBEDTLS_USER_CONFIG_FILE="${MBEDTLS_USER_CONFIG_FILE}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_PROGRAMS)
|
if(ENABLE_PROGRAMS)
|
||||||
|
@ -10,14 +10,6 @@ if(NOT DEFINED MBEDTLS_DIR)
|
|||||||
set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR})
|
set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If set, make MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE into PATHs
|
|
||||||
if(DEFINED MBEDTLS_CONFIG_FILE)
|
|
||||||
set(MBEDTLS_CONFIG_FILE "" CACHE PATH "Mbed TLS config file (overrides default).")
|
|
||||||
endif()
|
|
||||||
if(DEFINED MBEDTLS_USER_CONFIG_FILE)
|
|
||||||
set(MBEDTLS_USER_CONFIG_FILE "" CACHE PATH "Mbed TLS user config file (appended to default).")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(src_crypto
|
set(src_crypto
|
||||||
aes.c
|
aes.c
|
||||||
aesni.c
|
aesni.c
|
||||||
|
Reference in New Issue
Block a user