You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
1.2 KiB

# 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()