[FR]: Integrated ctest and other project improvements
Open
Nobody has claimed this yet.
triage
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Problem description
When trying to work on https://github.com/pybind/pybind11/pull/5094, I have encountered a few issues:
- The project does not use
ctest. This makes it quite hard for packagers to find and run tests. In principle it should usectest --build-and-testto test native CMake projects. For some inspiration, here is a template I have. - Building and testing from
sdistis not possible, i.e.:python3 -m build+pytest - Usage of custom
Find<Package>.cmakewhen there are upstream packaging available with good CMake support:catch,eigen3 - In general, the CMake project can be improved among a few things: inverting the version detection to be defined in CMake, making the
CMakeLists.txtfiles more readable
I am using the ci.yaml to fill in the gaps about how to the testing, but it would be much appreciated if the project can use standardized tools.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the project CMakeLists.txt files and ci.yaml to understand the current build and test paths. Try the reported python3 -m build plus pytest workflow and inspect how CTest could cover the native project. Done would require a decided scope covering standardized testing and the selected CMake or packaging improvements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, python
- Domain
- build-system, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100