2018-08-13 15:46:42 +08:00
|
|
|
cmake_minimum_required(VERSION 3.8.2)
|
2017-10-27 21:43:34 +08:00
|
|
|
if(NOT DEFINED TEST)
|
|
|
|
set(TEST min) # Have TEST default to min
|
|
|
|
endif()
|
|
|
|
|
|
|
|
macro(set_conf_file)
|
|
|
|
if(EXISTS $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/${TEST}/${BOARD}.conf)
|
|
|
|
set(CONF_FILE $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/${TEST}/${BOARD}.conf)
|
|
|
|
elseif(EXISTS $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/${TEST}/${ARCH}.conf)
|
|
|
|
set(CONF_FILE $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/${TEST}/${ARCH}.conf)
|
2018-01-07 05:15:53 +08:00
|
|
|
else()
|
|
|
|
set(CONF_FILE $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/prj.conf)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
|
|
|
|
project(NONE)
|
|
|
|
|
|
|
|
FILE(GLOB app_sources src/*.c)
|
|
|
|
target_sources(app PRIVATE ${app_sources})
|
|
|
|
|
|
|
|
if(${TEST} STREQUAL "float")
|
|
|
|
set(test_define TEST_max)
|
|
|
|
else()
|
|
|
|
set(test_define TEST_${TEST})
|
|
|
|
endif()
|
|
|
|
target_compile_definitions(app PRIVATE ${test_define})
|