mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 19:21:09 +01:00
Merge branch 'development' into merge_3.4.1
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@@ -34,9 +34,9 @@ cmake_policy(SET CMP0011 NEW)
|
||||
cmake_policy(SET CMP0012 NEW)
|
||||
|
||||
if(TEST_CPP)
|
||||
project("mbed TLS" C CXX)
|
||||
project("mbed TLS" LANGUAGES C CXX)
|
||||
else()
|
||||
project("mbed TLS" C)
|
||||
project("mbed TLS" LANGUAGES C)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
@@ -59,7 +59,7 @@ option(MBEDTLS_FATAL_WARNINGS "Compiler warnings treated as errors" ON)
|
||||
if(CMAKE_HOST_WIN32)
|
||||
option(GEN_FILES "Generate the auto-generated files as needed" OFF)
|
||||
else()
|
||||
option(GEN_FILES "Generate the auto-generated files as needed" OFF)
|
||||
option(GEN_FILES "Generate the auto-generated files as needed" ON)
|
||||
endif()
|
||||
|
||||
option(DISABLE_PACKAGE_CONFIG_AND_INSTALL "Disable package configuration, target export and installation" ${MBEDTLS_AS_SUBPROJECT})
|
||||
@@ -118,6 +118,10 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
FORCE)
|
||||
endif()
|
||||
|
||||
# Make MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE into PATHs
|
||||
set(MBEDTLS_CONFIG_FILE "" CACHE FILEPATH "Mbed TLS config file (overrides default).")
|
||||
set(MBEDTLS_USER_CONFIG_FILE "" CACHE FILEPATH "Mbed TLS user config file (appended to default).")
|
||||
|
||||
# Create a symbolic link from ${base_name} in the binary directory
|
||||
# to the corresponding path in the source directory.
|
||||
# Note: Copies the file(s) on Windows.
|
||||
@@ -245,7 +249,7 @@ if(MBEDTLS_FATAL_WARNINGS)
|
||||
endif(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNU)
|
||||
|
||||
if (CMAKE_COMPILER_IS_IAR)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warning_are_errors")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warnings_are_errors")
|
||||
endif(CMAKE_COMPILER_IS_IAR)
|
||||
endif(MBEDTLS_FATAL_WARNINGS)
|
||||
|
||||
@@ -297,6 +301,20 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/everest/include)
|
||||
|
||||
# Pass-through MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE
|
||||
if(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(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()
|
||||
|
||||
if(ENABLE_PROGRAMS)
|
||||
|
||||
Reference in New Issue
Block a user