Martchus / cpp-utilities

Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
GNU General Public License v2.0
52 stars 18 forks source link

Tests fail to run: Could not find executable /usr/ports/devel/cpp-utilities/work/.build/c++utilities_tests #26

Closed yurivict closed 1 year ago

yurivict commented 1 year ago

It is unclear how c++utilities_tests can be built, since there's no option that enables tests, and the standard cmake option BUILD_TESTING doesn't work.

Martchus commented 1 year ago

Tests are not built by default. I didn't know that there's the standard variable BUILD_TESTING so I used EXCLUDE_TESTS_FROM_ALL in this project and other projects based on it. Set it to OFF to build tests by default as documented. Since this is most useful for development it is also set this way when setting ENABLE_DEVEL_DEFAULTS to ON.

For packaging I recommend to not set any special variables and instead invoke the check target which builds and runs tests. As suggested in the README, checkout my PKGBUILDs repo for packaging examples.

yurivict commented 1 year ago

Ok, thanks.