From 332c740a8b06bbb69a1b75bd44c32cdac126579b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alan=20Dragomirecky=CC=81?= Date: Fri, 9 Jul 2021 23:06:20 +0200 Subject: [PATCH] Do not build the firmware target when crosscompiling --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 206abc6..1595cc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()