Files
partridge-cpp/CMakeLists.txt
T
Codex instance 3e667d6de0 solver: construct odd-order solutions
Avoid repeating the exponential search for odd orders at least nine. Search the even predecessor, translate its row-major placements to the enlarged board, and tile the new border.

Keep direct search and construction explicit so benchmarks can report their costs separately. Verify the routed order-9 result independently and require its search counters to match order 8.

Tests: Release, Debug, ASan and UBSan CTest (8 passed each)

Refs: #6
2026-07-30 17:24:06 +01:00

34 lines
1.1 KiB
CMake

cmake_minimum_required(VERSION 4.0)
project(partridge_cpp)
set(CMAKE_CXX_STANDARD 20)
add_executable(partridge_cpp
main.cc)
option(PARTRIDGE_BUILD_BENCHMARKS "Build the heavyweight benchmark probe" OFF)
if(PARTRIDGE_BUILD_BENCHMARKS)
add_executable(partridge_benchmark
benchmarks/benchmark.cc)
endif()
include(CTest)
if(BUILD_TESTING)
add_executable(partridge_tests
tests/tests.cc)
add_test(NAME validator COMMAND partridge_tests validator)
add_test(NAME construction COMMAND partridge_tests construction)
add_test(NAME solver-odd-route COMMAND partridge_tests solver-odd-route)
add_test(NAME rendering COMMAND partridge_tests rendering)
add_test(NAME solver-small COMMAND partridge_tests solver-small)
add_test(NAME solver-completion COMMAND partridge_tests solver-completion)
add_test(NAME search-counters COMMAND partridge_tests search-counters)
find_package(Python3 COMPONENTS Interpreter)
if(Python3_Interpreter_FOUND)
add_test(NAME benchmark-format
COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/run.py"
--self-test)
endif()
endif()