I’m new to CMAke and trying to set up a cross compile project for ARM using the Armcc tools (from Keil) . I saw the toolchain files are part of the Cmake distribution , so I’m trying to use it … without any success. I set up a simple test project with this CMakeLists.txt :
# add the executable
When I launch:
cmake D:\Tmp\Test -D CMAKE_TOOLCHAIN_FILE=“D:\Dev\CMake\share\cmake-3.18\Modules\Compiler\ARMCC.cmake” -D CMAKE_C_COMPILER_ID=ARMCC -D CMAKE_CXX_COMPILER_ID=ARMCC -GNinja
It’s seems it’s not using the compiler defined in the toolchain but trying to use gcc installed on my desktop.
So I’m not sure to understand how to use the provided compilers from the armcc toolchain ?