Skip to content

Commit 4451d32

Browse files
author
Felipe Torrezan
authored
Fix: set CMake for cross-compiling (#21)
We set CMAKE_SYSTEM_NAME to Generic to prevent CMake from overwriting it with the host's system name (e.g., amd64) when cross-compiling with the IAR compiler. This commit reverts changes performed on 16bed53 during cleanup. Fix #20.
1 parent be355cf commit 4451d32

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/iar-toolchain.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ set(TOOLKIT arm)
88
# Get the toolchain target from the TOOLKIT
99
get_filename_component(CMAKE_SYSTEM_PROCESSOR ${TOOLKIT} NAME)
1010

11+
# Set CMake for cross-compiling
12+
set(CMAKE_SYSTEM_NAME Generic)
13+
1114
# IAR C Compiler
1215
find_program(CMAKE_C_COMPILER
1316
NAMES icc${CMAKE_SYSTEM_PROCESSOR}

0 commit comments

Comments
 (0)