I am trying to cross-compile a project for embedded ARM Cortex builds, but I am unable to get the linker working. I want to use armlink, but no files are passed to armlink a
From my experience, you cannot set CMAKE_EXE_LINKER_FLAGS
in a CMakeLists.txt file. It has to be passed via a CMAKE_TOOLCHAIN_FILE when CMake is invoked the very first time in a build directory.
I don't find any documentation regarding this problem, but there is the cross-compilation with CMake page which you should use it if you do cross-compilation.
For a start, just put your set
-calls in a toolchain file and run
cmake -DCMAKE_TOOLCHAIN_FILE=
in a clean build directory.