Do not build the firmware target when crosscompiling

pull/53/head
Alan Dragomirecký 2021-07-09 23:06:20 +02:00
parent 23b164ab7d
commit 846c4add67
No known key found for this signature in database
GPG Key ID: 408E8F08D33F9D03
1 changed files with 3 additions and 0 deletions

View File

@ -165,6 +165,9 @@ target_compile_options(firmware PRIVATE -Wdouble-promotion)
add_subdirectory(src)
if(NOT CMAKE_CROSSCOMPILING)
# do not build the firmware by default (tests are the focus if not crosscompiling)
set_target_properties(firmware PROPERTIES EXCLUDE_FROM_ALL YES)
enable_testing()
add_subdirectory(tests)
endif()