xref: /aosp_15_r20/external/mbedtls/programs/test/cmake_subproject/cmake_subproject.c (revision 62c56f9862f102b96d72393aff6076c951fb8148)
1 /*
2  *  Simple program to test that CMake builds with Mbed TLS as a subdirectory
3  *  work correctly.
4  *
5  *  Copyright The Mbed TLS Contributors
6  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
7  */
8 
9 #include "mbedtls/build_info.h"
10 
11 #include "mbedtls/platform.h"
12 
13 #include "mbedtls/version.h"
14 
15 /* The main reason to build this is for testing the CMake build, so the program
16  * doesn't need to do very much. It calls a single library function to ensure
17  * linkage works, but that is all. */
main()18 int main()
19 {
20     /* This version string is 18 bytes long, as advised by version.h. */
21     char version[18];
22 
23     mbedtls_version_get_string_full(version);
24 
25     mbedtls_printf("Built against %s\n", version);
26 
27     return 0;
28 }
29