-
Notifications
You must be signed in to change notification settings - Fork 15
/
ewarm.cmake
26 lines (22 loc) · 1.16 KB
/
ewarm.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Toolchain File for the IAR C/C++ Compiler
# Set CMake for cross-compiling
set(CMAKE_SYSTEM_NAME Generic)
# Set CMake to use the IAR C/C++ Compiler from the IAR Embedded Workbench for Arm
# Update if using a different supported target or operating system
set(CMAKE_ASM_COMPILER "C:/Program Files/IAR Systems/Embedded Workbench 9.3/arm/bin/iasmarm.exe")
set(CMAKE_C_COMPILER "C:/Program Files/IAR Systems/Embedded Workbench 9.3/arm/bin/iccarm.exe")
set(CMAKE_CXX_COMPILER "C:/Program Files/IAR Systems/Embedded Workbench 9.3/arm/bin/iccarm.exe")
# Avoids running the linker during try_compile()
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
# Set the default build tool for Ninja gnerators
# Reasonably recent IAR products ships with ninja (https://ninja-build.org)
# The CMake code block below tries to find it. If not found,
# manually install the desired build system in your operating system
# Alternatively: set(CMAKE_MAKE_PROGRAM "C:/path/to/ninja.exe")
if(CMAKE_GENERATOR MATCHES "^Ninja.*$")
find_program(CMAKE_MAKE_PROGRAM
NAMES ninja.exe
PATHS $ENV{PATH}
"C:/Program Files/IAR Systems/Embedded Workbench 9.3/common/bin"
REQUIRED)
endif()