Skip to content

CMake overwrites CMAKE_SYSTEM_PROCESSOR when not explicitly cross-compiling #20

@jofa-ph

Description

@jofa-ph

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions