aminya / cpp_vcpkg_project

A production-ready C++ project made with vcpkg
https://github.com/aminya/project_options
The Unlicense
26 stars 5 forks source link

Fix: set FEATURE_TESTS in debug linux test presets #14

Closed nejcgalof closed 2 years ago

nejcgalof commented 2 years ago

Test presets not find the tests. enable_testing() is added when the FEATURE_TESTS is set. After that, when the test preset is run, the tests are found and run correctly.

nejcgalof commented 2 years ago

@aminya If you think, it is good to enable tests for release build too, then I can add that. Other option is to create presets with and without the variable FEATURE_TESTS, and test presets are linked to the presets with a flag on. What do you think?

aminya commented 2 years ago

I don't use the CMake presets personally. I use Taskfile.yml. If adding a new entry for the release builds with tests helps, feel free to make a PR.