mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Use emptiness-checks rather than DEFINED checks
For the MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE variables, check that they are non-empty and defined. This means they can be unconditionally created in the cache, simplifying the CMakeLists.txt Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@ -230,11 +230,11 @@ foreach(target IN LISTS target_libraries)
|
||||
target_compile_definitions(${target}
|
||||
PRIVATE ${thirdparty_def})
|
||||
# Pass-through MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE
|
||||
if(DEFINED MBEDTLS_CONFIG_FILE)
|
||||
if(MBEDTLS_CONFIG_FILE)
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC MBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}")
|
||||
endif()
|
||||
if(DEFINED MBEDTLS_USER_CONFIG_FILE)
|
||||
if(MBEDTLS_USER_CONFIG_FILE)
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC MBEDTLS_USER_CONFIG_FILE="${MBEDTLS_USER_CONFIG_FILE}")
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user