cucumber / cucumber-cpp

Support for writing Cucumber step definitions in C++
MIT License
304 stars 131 forks source link

Strict cmake options #281

Closed ursfassler closed 7 months ago

ursfassler commented 7 months ago

Summary

Cmake now fails when an option is enabled but a needed dependency is missing.

Details

To not fail too much, only the minimal set of options to use cucumber-cpp is enabled by default.

Test frameworks are off by default because every one has an external dependency. A warning is shown when no test framework is selected as one is needed for cucumber-cpp to be usable.

Motivation and Context

When a developer enables an option she want to use this feature. At the moment, the option can be enabled but when the dependency is not found that feature is not included. With this change, cmake fails if a dependency for an enabled option is not found.

How Has This Been Tested?

Manually by configuring the project with cmake. Changes in the CI script also reflect the changes.

Types of changes

This change possibly breaks some existing CI because no test framework is selected by default. The warning message shows what the problem is and how it can be solved.

Checklist: