Browse Source

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.
pull/22/head
Felipe Torrezan 2 years ago
committed by GitHub
parent
commit
4451d32bbf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      examples/iar-toolchain.cmake

3
examples/iar-toolchain.cmake

@ -8,6 +8,9 @@ set(TOOLKIT arm)
# Get the toolchain target from the TOOLKIT
get_filename_component(CMAKE_SYSTEM_PROCESSOR ${TOOLKIT} NAME)
# Set CMake for cross-compiling
set(CMAKE_SYSTEM_NAME Generic)
# IAR C Compiler
find_program(CMAKE_C_COMPILER
NAMES icc${CMAKE_SYSTEM_PROCESSOR}

Loading…
Cancel
Save