Files
ANSCORE/tests
nghianguyenandClaude Opus 5 6abe6d6694 fix(build): configure without CUDA instead of failing at generate
tests/CMakeLists.txt added every test directory unconditionally, so a
machine with no CUDA toolkit — every macOS one — died at generate time on
"links to CUDA::cudart but the target was not found", taking the
cross-platform targets down with it.

Gate each test the way its subject is already gated: the five that need
the toolkit behind ANSCORE_HAS_CUDA, the ANSIO one behind WIN32, and the
ANSONVIF one behind both. ANSONVIF itself uses no CUDA; its test names
CUDA::cudart and CUDA::nvjpeg only because it drives capture through
ANSCV and was copied from the ANSCV test.

Two non-test targets had the same problem. ANSCV genuinely needs the
toolkit — ANSGpuFrameOps.h includes <cuda_runtime.h> unconditionally and
calls cudaMemcpy2D/cudaMallocPitch — so it moves into the existing CUDA
block beside the engine modules. ANSLibsLoader binds cudart at runtime
and ships its own stubs, but still compiles against the runtime header
for the types and links CUDA::cudart_static, so it is gated too.

Also call enable_testing(), which the project never did: without it the
add_test() under tests/ reached nothing and ctest found no tests. Plain
enable_testing(), not include(CTest), to avoid its extra targets.

A CUDA machine is unchanged: every gate holds there, ANSCV keeps its
place in the subdirectory order, and the only new output is
CTestTestfile.cmake.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 23:38:57 +10:00
..
2026-03-29 12:51:37 +11:00
2026-05-06 19:55:52 +10:00
2026-04-24 14:48:55 +10:00
2026-06-18 05:55:31 +10:00
2026-05-02 12:24:53 +10:00
2026-03-29 12:51:37 +11:00
2026-06-18 05:55:31 +10:00