mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-24 14:20:59 +08:00
Merge pull request #10231 from ronald-cron-arm/mbedtls-build-info
Preparatory work for the resolution of #10022
This commit is contained in:
commit
7c536dab54
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
||||||
|
|
||||||
#include "mbedtls/build_info.h"
|
#include "tf-psa-crypto/build_info.h"
|
||||||
|
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
||||||
|
|
||||||
#include "mbedtls/build_info.h"
|
#include "tf-psa-crypto/build_info.h"
|
||||||
|
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
/* md.h is included this early since MD_CAN_XXX macros are defined there. */
|
/* md.h is included this early since MD_CAN_XXX macros are defined there. */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
||||||
|
|
||||||
#include "mbedtls/build_info.h"
|
#include "tf-psa-crypto/build_info.h"
|
||||||
|
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
/* md.h is included this early since MD_CAN_XXX macros are defined there. */
|
/* md.h is included this early since MD_CAN_XXX macros are defined there. */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
||||||
|
|
||||||
#include "mbedtls/build_info.h"
|
#include "tf-psa-crypto/build_info.h"
|
||||||
|
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
/* md.h is included this early since MD_CAN_XXX macros are defined there. */
|
/* md.h is included this early since MD_CAN_XXX macros are defined there. */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
#define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
|
||||||
|
|
||||||
#include "mbedtls/build_info.h"
|
#include "tf-psa-crypto/build_info.h"
|
||||||
|
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
/* md.h is included this early since MD_CAN_XXX macros are defined there. */
|
/* md.h is included this early since MD_CAN_XXX macros are defined there. */
|
||||||
|
@ -2,20 +2,16 @@ set(libs
|
|||||||
${mbedtls_target}
|
${mbedtls_target}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(executables_libs
|
set(executables
|
||||||
metatest
|
metatest
|
||||||
query_compile_time_config
|
query_compile_time_config
|
||||||
query_included_headers
|
query_included_headers
|
||||||
selftest
|
selftest
|
||||||
udp_proxy
|
udp_proxy
|
||||||
)
|
|
||||||
add_dependencies(${programs_target} ${executables_libs})
|
|
||||||
add_dependencies(${ssl_opt_target} udp_proxy)
|
|
||||||
|
|
||||||
set(executables_mbedcrypto
|
|
||||||
zeroize
|
zeroize
|
||||||
)
|
)
|
||||||
add_dependencies(${programs_target} ${executables_mbedcrypto})
|
add_dependencies(${programs_target} ${executables})
|
||||||
|
add_dependencies(${ssl_opt_target} udp_proxy)
|
||||||
add_dependencies(${ssl_opt_target} query_compile_time_config)
|
add_dependencies(${ssl_opt_target} query_compile_time_config)
|
||||||
|
|
||||||
if(TEST_CPP)
|
if(TEST_CPP)
|
||||||
@ -74,7 +70,7 @@ else()
|
|||||||
link_to_source(query_config.c)
|
link_to_source(query_config.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(exe IN LISTS executables_libs executables_mbedcrypto)
|
foreach(exe IN LISTS executables)
|
||||||
set(source ${exe}.c)
|
set(source ${exe}.c)
|
||||||
set(extra_sources "")
|
set(extra_sources "")
|
||||||
if(NOT EXISTS ${source} AND
|
if(NOT EXISTS ${source} AND
|
||||||
@ -102,16 +98,9 @@ foreach(exe IN LISTS executables_libs executables_mbedcrypto)
|
|||||||
|
|
||||||
# Request C11, required for memory poisoning
|
# Request C11, required for memory poisoning
|
||||||
set_target_properties(${exe} PROPERTIES C_STANDARD 11)
|
set_target_properties(${exe} PROPERTIES C_STANDARD 11)
|
||||||
|
|
||||||
# This emulates "if ( ... IN_LIST ... )" which becomes available in CMake 3.3
|
|
||||||
list(FIND executables_libs ${exe} exe_index)
|
|
||||||
if (${exe_index} GREATER -1)
|
|
||||||
target_link_libraries(${exe} ${libs} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${exe} ${libs} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
else()
|
|
||||||
target_link_libraries(${exe} ${tfpsacrypto_target} ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
install(TARGETS ${executables_libs} ${executables_mbedcrypto}
|
install(TARGETS ${executables}
|
||||||
DESTINATION "bin"
|
DESTINATION "bin"
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||||
|
@ -35,4 +35,4 @@ find_package(MbedTLS REQUIRED)
|
|||||||
|
|
||||||
add_executable(cmake_package cmake_package.c)
|
add_executable(cmake_package cmake_package.c)
|
||||||
target_link_libraries(cmake_package
|
target_link_libraries(cmake_package
|
||||||
MbedTLS::tfpsacrypto MbedTLS::mbedtls MbedTLS::mbedx509)
|
MbedTLS::mbedtls MbedTLS::mbedx509 MbedTLS::tfpsacrypto)
|
||||||
|
@ -38,4 +38,4 @@ find_package(MbedTLS REQUIRED)
|
|||||||
|
|
||||||
add_executable(cmake_package_install cmake_package_install.c)
|
add_executable(cmake_package_install cmake_package_install.c)
|
||||||
target_link_libraries(cmake_package_install
|
target_link_libraries(cmake_package_install
|
||||||
MbedTLS::tfpsacrypto MbedTLS::mbedtls MbedTLS::mbedx509)
|
MbedTLS::mbedtls MbedTLS::mbedx509 MbedTLS::tfpsacrypto)
|
||||||
|
@ -14,9 +14,9 @@ add_subdirectory(${MBEDTLS_DIR} build)
|
|||||||
# Link against all the Mbed TLS libraries. Verifies that the targets have been
|
# Link against all the Mbed TLS libraries. Verifies that the targets have been
|
||||||
# created using the specified prefix
|
# created using the specified prefix
|
||||||
set(libs
|
set(libs
|
||||||
subproject_test_tfpsacrypto
|
|
||||||
subproject_test_mbedx509
|
|
||||||
subproject_test_mbedtls
|
subproject_test_mbedtls
|
||||||
|
subproject_test_mbedx509
|
||||||
|
subproject_test_tfpsacrypto
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(cmake_subproject cmake_subproject.c)
|
add_executable(cmake_subproject cmake_subproject.c)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
set(libs
|
set(libs
|
||||||
${tfpsacrypto_target}
|
|
||||||
${mbedx509_target}
|
${mbedx509_target}
|
||||||
|
${tfpsacrypto_target}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(executables
|
set(executables
|
||||||
|
Loading…
x
Reference in New Issue
Block a user