Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
76 stars 59 forks source link

C and C++ language standards support is inconsistent and missing some standards versions #1785

Closed EaselinkBachmann closed 1 month ago

EaselinkBachmann commented 2 months ago

Describe the bug

The CMake build system generated by cmsis-toolbox has inconsistent support for some standards:

As an additional enhancement, the following missing language standards should be added:

To Reproduce

Specify language-C: gnu17 or language-C: gnu23 in a .cproject.yml file and attempt to build the project. The build fails with unknown 'language' value 'gnu17' !.

Specify language-CPP: c++20 or language-CPP: gnu++20 in a .cproject.yml file and attempt to build a project containing C++20 features (such as requires clauses). The build fails with C++ syntax errors due to the mode not being C++20.

Expected behavior

Language standard support should be consistent and either correctly passed to the compiler or not implemented.

Environment (please complete the following information):

Additional context

New issue as suggested in #1703.