2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2018-12-11 23:33:23 +08:00
|
|
|
cmake_minimum_required(VERSION 3.13.1)
|
2020-02-12 22:00:46 +08:00
|
|
|
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
|
2018-10-25 22:54:09 +08:00
|
|
|
project(device)
|
2018-02-15 12:36:01 +08:00
|
|
|
|
|
|
|
FILE(GLOB app_sources src/*.c)
|
|
|
|
target_sources(app PRIVATE ${app_sources})
|
2019-03-29 01:11:31 +08:00
|
|
|
|
|
|
|
# device_get_binding() compares pointers first before doing strcmp().
|
|
|
|
# However, enabling coverage forces -O0 to disable any compiler
|
|
|
|
# optimizations. There would be multiple copies of the same string,
|
2019-06-19 02:45:40 +08:00
|
|
|
# and the code pathing doing pointer comparison would not be tested
|
2019-03-29 01:11:31 +08:00
|
|
|
# at all. So add this flag to merge string constants such that
|
|
|
|
# the pointer comparison would be exercised.
|
|
|
|
zephyr_cc_option_ifdef(CONFIG_COVERAGE -fmerge-constants)
|