2 * Simple program to test that CMake builds with Mbed TLS as a subdirectory
5 * Copyright (C) 2006-2019, ARM Limited, All Rights Reserved
6 * SPDX-License-Identifier: Apache-2.0
8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
9 * not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
20 * This file is part of mbed TLS (https://tls.mbed.org)
23 #if !defined(MBEDTLS_CONFIG_FILE)
24 #include "mbedtls/config.h"
26 #include MBEDTLS_CONFIG_FILE
29 #if defined(MBEDTLS_PLATFORM_C)
30 #include "mbedtls/platform.h"
34 #define mbedtls_fprintf fprintf
35 #define mbedtls_printf printf
36 #define mbedtls_exit exit
37 #define MBEDTLS_EXIT_SUCCESS EXIT_SUCCESS
38 #define MBEDTLS_EXIT_FAILURE EXIT_FAILURE
39 #endif /* MBEDTLS_PLATFORM_C */
41 #include "mbedtls/version.h"
43 /* The main reason to build this is for testing the CMake build, so the program
44 * doesn't need to do very much. It calls a single library function to ensure
45 * linkage works, but that is all. */
48 /* This version string is 18 bytes long, as advised by version.h. */
51 mbedtls_version_get_string_full( version );
53 mbedtls_printf( "Built against %s\n", version );