quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

cmake_package.c (703B)


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