Hello,
I’m trying to create my own toolchain file, but I’m getting
a strange error message:
“[…] Run Build Command(s): -f Makefile cmTC_7ea91/fast […]”
Obviously before “-f” the make command is missing.
This only happens if I use “set(CMAKE_MAKE_PROGRAM /usr/bin/make)”.
What do I need to set to make cmake work?
Here’s my cmake command:
cmake -DCMAKE_TOOLCHAIN_FILE=…/tc.cmake …
Here’s the toolchain file:
set(CMAKE_FIND_ROOT_PATH /opt/avr)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_MAKE_PROGRAM /usr/bin/make)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR avr)
set(CMAKE_CROSSCOMPILING 1)
find_program(AVR_CC avr-gcc REQUIRED)
set(CMAKE_C_COMPILER ${AVR_CC})
Here’s the CMakeLists.txt:
cmake_minimum_required(VERSION 3.10)
project(problem C)
add_executable(simple simple.c)
Here’s the output of “cmake --version”:
cmake version 3.23.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
The system is a Linux Debian unstable.
And for completeness, here’s simple.c:
int main()
{
return 0;
}
Detlef