InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.68k stars 916 forks source link

CMake detecting system toolchain #1540

Open Riksu9000 opened 1 year ago

Riksu9000 commented 1 year ago

Verification

Introduce the issue

When generating the project, CMake claims the compiler in use is one from the system, not the arm crosscompiler. I don't know if this causes side-effects, but it seems incorrect nonetheless.

Output from a build workflow.

-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done

Preferred solution

Moving the inclusion of the toolchain file earlier seems to fix the issue, but I'm not very familiar with CMake, so I want to give an opportunity to someone who knows better to look at it and find a good solution to this issue. This can be an opportunity to also check the structure of the CMake files, which seems like it might be quite outdated.

Version

No response