CMake overwrites CMAKE_SYSTEM_PROCESSOR which is set in iar-toolchain.cmake with detected PC architecture (e.g. AMD64). Therefore, the CSpy tests created using the function iar_cspy_add_test defined in iar-cspy-rl78.cmake fail. This is, because file names are created using the overwritten variable.
To fix this, CMAKE_SYSTEM_NAME should be set to Generic in the toolchain file. This keeps CMake from automatically detecting and overwriting CMAKE_SYSTEM_PROCESSOR.
CMake overwrites
CMAKE_SYSTEM_PROCESSOR
which is set in iar-toolchain.cmake with detected PC architecture (e.g. AMD64). Therefore, the CSpy tests created using the functioniar_cspy_add_test
defined in iar-cspy-rl78.cmake fail. This is, because file names are created using the overwritten variable.To fix this,
CMAKE_SYSTEM_NAME
should be set toGeneric
in the toolchain file. This keeps CMake from automatically detecting and overwritingCMAKE_SYSTEM_PROCESSOR
.