CMake metadata badges
- Dominant language
- JavaScript
- Stars
- 27.2k
- Forks
- 5.6k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 46
Description
There are two useful informations that can be extracted from a CMake project
- `cmake_minimum_required`
- `project(VERSION)`
Unfortunately it would not be possible to extract them via json/yaml/toml, but if regex is an option, here are the regex to extract the information:
- `cmake_minimum_required\([\n\r\s]*VERSION[\n\r\s]*(?P[\d\.]+)[^\)]*\)`
- `project\([^\)]*VERSION[\n\r\s]*(?P[\d\.]+)[^\)]*\)`
This can simply be run on the top-level file `CMakeLists.txt` or wherever the root is redirected.
Let me know if this is appropriate to implement, and if I should make a PR for it.
Contributor guide
Research direction
Start by reviewing the proposed extraction patterns and how a CMake project's root is selected, using the top-level CMakeLists.txt or redirected root described in the issue. Confirm how the two CMake values would be exposed as badge metadata and identify the relevant existing tests before deciding what completion should cover.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100