diff options
author | Ronald Cron <ronald.cron@arm.com> | 2020-06-26 16:37:02 +0200 |
---|---|---|
committer | Ronald Cron <ronald.cron@arm.com> | 2020-06-29 09:21:54 +0200 |
commit | dd6bdb505647861da88ea2b001d457127a62d4e6 (patch) | |
tree | b2db084f39f00294ef275ef44c46b2a902cfe6db | |
parent | 00890e3d10535077eb5e8b5b143e9f7c47d1086c (diff) | |
download | mbed-tls-dd6bdb505647861da88ea2b001d457127a62d4e6.tar.gz |
cmake: Add comment about mbedtls_test target
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index af7400c9f..f7e2ed08b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,6 +238,20 @@ list(APPEND libs ${thirdparty_lib}) add_subdirectory(library) +# +# The C files in tests/src directory contain test code shared among test suites +# and programs. This shared test code is compiled and linked to test suites and +# programs objects as a set of compiled objects. The compiled objects are NOT +# built into a library that the test suite and program objects would link +# against as they link against the mbedcrypto, mbedx509 and mbedtls libraries. +# The reason is that such library is expected to have mutual dependencies with +# the aforementioned libraries and that there is as of today no portable way of +# handling such dependencies (only toolchain specific solutions). +# +# Thus the below definition of the `mbedtls_test` CMake library of objects +# target. This library of objects is used by tests and programs CMake files +# to define the test executables. +# if(ENABLE_TESTING OR ENABLE_PROGRAMS) file(GLOB MBEDTLS_TEST_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/src/*.c) add_library(mbedtls_test OBJECT ${MBEDTLS_TEST_FILES}) |