InfiniTimeOrg / InfiniTime

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

GCC >= 10 is now required #1957

Open grnmeira opened 8 months ago

grnmeira commented 8 months ago

Verification

Introduce the issue

I was compiling InfiniSim (and InfiniTime) on an Ubuntu 20.04 (WSL), which comes with GCC 8 if I'm not mistaken, and ran into a couple of issues with C++20 support. Tried GCC 9 too but kept having the same problem.

This commit introduces the use of consteval (C+++20), but that's only supported by GCC10 onwards.

Preferred solution

It'd be a good idea to make that assumption explicit in the CMake configurations. I'd be happy to place a PR for that if contributions are welcome.

Version

fc5424cb@main

JF002 commented 8 months ago

The documentation mentions the version of GCC (10.3) we support for building InfiniTime. This version is also integrated in the Docker build image.

But yeah, we can add a check in in CMake files. PRs are welcome (but it might take some time for us to review it, depending on our free time available :) ).