Add CTest support and option to skip test progs #760
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 CTest1 so can be compatible if future switch toinclude(CTest)
.Note that CI does not test this as
BUILD_PROG=OFF
for Linux:leptonica/.github/workflows/cmake.yml
Line 46 in 96a3d74
Footnotes
https://cmake.org/cmake/help/latest/module/CTest.html ↩