You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

37 lines
1.1 KiB

cmake_minimum_required(VERSION 3.20)
# TODO 1: Add the `project()`'s `VERSION` and set it to `2.7.1`
project(Project LANGUAGES C)
add_executable(version)
target_sources(version PRIVATE main.c)
# TODO 2: Configure `version.h.in` to generate `version.h`
configure_file()
# TODO 3: Add the Project Binary Directory to the target's include directories
target_include_directories()
target_compile_options(version PRIVATE --cpu=cortex-m4)
target_link_options(version PRIVATE
--cpu=cortex-m4
--semihosting)
enable_testing()
add_test(NAME version-test
COMMAND /opt/iarsystems/bxarm/common/bin/CSpyBat
# C-SPY drivers for the Arm simulator via command line interface
/opt/iarsystems/bxarm/arm/bin/libarmPROC.so
/opt/iarsystems/bxarm/arm/bin/libarmSIM2.so
--plugin=/opt/iarsystems/bxarm/arm/bin/libarmLibsupportUniversal.so
# The target executable (built with debug information)
--debug_file=$<TARGET_FILE:version>
# C-SPY driver options
--backend
--cpu=cortex-m4
--semihosting)
set_tests_properties(version-test PROPERTIES PASS_REGULAR_EXPRESSION "2.7.1")