[Feature Request] Support for CMake

Open
#556 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, cmake
Domain
build-system

Research direction

The issue names no source files or entry points; it asks for a CMake build for the C library. Start by finding the existing build files in the repository and the FreeRTOS-Kernel CMake support the issue cites as a reference. Done would mean a CMake configuration that builds the library with GCC and Clang, which the maintainers would need to agree on first.

Written by the indexing model from the issue text.

Description

help wanted

Is your feature request related to a problem? Please describe.
As an integrator of FreeRTOS-Plus-TCP would like to support compilation via CMake.

Describe the solution you'd like

I would like to be able to integrate FreeRTOS-Plus-TCP via CMake to support a simpler build environment for native and cross-compilation.

I typically build my environments with an opt-out approach to all warnings and issues linters/compilers provide while compiling/building. The primary compilers I use are GNU and Clang (sometimes MSVC).

I typically pull in repositories of this kind using (FetchContent)[https://cmake.org/cmake/help/latest/module/FetchContent.html?highlight=fetchcontent] functionality as it provides one key benefit over git submodules which is to allow a top level project to dictate the version being pulled, yet others FetchContent repos may request different versions. Allowing the integrator of this project to decide on the version being pulled. It also allows for a simple migration if/when a contributor decides to fork a repo (if required).

Describe alternatives you've considered
There are other build environments out there that support cross compilation (eg. meson, bazel); however, CMake is the most wide spread and widely used. It is also the one that has support in the FreeRTOS-Kernel project as of v10.5.0. Supporting other build environments in the future is not hindered by supporting CMake now.

Additional context
I will provide an example build of the existing code that I lay over the current FreeRTOS-Plus-TCP that allows me to compile for both GCC and CLang and provides hooks to compile with other compilers.

With the addition of the compiler warning opt-out approach it will also identify documentation and other potential fixes that you may want to clean-up within the code, now that those compilers are defined with the strictest of measures.

Dominant language
C
Stars
215
Forks
222
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FreeRTOS/FreeRTOS-Plus-TCP

All issues in FreeRTOS/FreeRTOS-Plus-TCP

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.