1# SPDX-License-Identifier: Apache-2.0 2 3cmake_minimum_required(VERSION 3.20.0) 4find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 5project(device) 6 7FILE(GLOB app_sources src/*.c) 8target_sources(app PRIVATE ${app_sources}) 9 10# device_get_binding() compares pointers first before doing strcmp(). 11# However, enabling coverage forces -O0 to disable any compiler 12# optimizations. There would be multiple copies of the same string, 13# and the code pathing doing pointer comparison would not be tested 14# at all. So add this flag to merge string constants such that 15# the pointer comparison would be exercised. 16zephyr_cc_option_ifdef(CONFIG_COVERAGE -fmerge-constants) 17