DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.81k stars 393 forks source link

Add CTest support and option to skip test progs #760

Open cho-m opened 1 month ago

cho-m commented 1 month ago

Partially fix #759 when building for distribution that doesn't care about test programs. Similar idea to how CTest -DBUILD_TESTING=OFF or GNOME's common meson -Dtests=disabled usually avoids compiling unnecessary files.

Build can still fail on Linux/glibc when -DBUILD_TESTING=ON as some progs needs -lm but lower priority for packaging which is my main concern.

Used BUILD_TESTING option as that is default for CTest^1 so can be compatible if future switch to include(CTest).

Note that CI does not test this as BUILD_PROG=OFF for Linux: https://github.com/DanBloomberg/leptonica/blob/96a3d7451e7d717d8a0c88436f5ff7ea7129412e/.github/workflows/cmake.yml#L46

cho-m commented 3 weeks ago

Not entirely sure on test cases. Seems to run.

However, I think the full test suite will fail without gnuplot.

zdenop commented 3 weeks ago

The primary building tools are autotools. I am not sure if it make sense to run the same with another build system (cmake). This is the reason why did not build progs with cmake (not to waste resources and time).