1# SPDX-License-Identifier: Apache-2.0
2
3cmake_minimum_required(VERSION 3.20.0)
4
5find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
6
7project(util)
8
9target_sources(testbinary
10  PRIVATE
11  main.c
12  ${ZEPHYR_BASE}/lib/utils/dec.c
13  ${ZEPHYR_BASE}/lib/utils/utf8.c
14)
15
16if(CONFIG_CPP)
17  # When testing for C++ force test file C++ compilation
18  set_source_files_properties(main.c ${ZEPHYR_BASE}/lib/utils/dec.c PROPERTIES LANGUAGE CXX)
19endif()
20