Adds top-level CMake build (T-04): static JTest lib, example, ctest smoke #1
Reference in New Issue
Block a user
Delete Branch "t01-cmake-build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The project was Makefile-only and non-portable. Adds a top-level
CMakeLists.txt so the framework builds with a standard build system:
units. No find_package/FetchContent is needed: a full #include scan of
include/, src/, examples/ shows the framework depends only on the C++
standard library plus its own <JTest/...> headers.
JTest (the example, tests) inherit the include path transitively.
requirement (sources use std::optional).
carried over (that is T-20's scope).
that exercises the public API and exits non-zero on any failed assertion, so
ctest is a real pass/fail gate. The demo example remains a build/run target
but is intentionally excluded from the CTest gate (it contains deliberate
failing/skipping cases to showcase reporting and always exits 0).
Verified end-to-end (CMake 4.4.3, AppleClang 21, out-of-source build):
configure OK, builds libJTest.a + example + test_smoke, ctest passes
(smoke: Passed, 100%), example demo runs.