Provide a separately installed OR-Tools model to compare a generic constraint solver with the native first-solution path without adding a production or default-test dependency. Use no-overlap, exact-fill, edge and equal-copy symmetry constraints, validate placements independently, and record model size, memory, worker count and timings for orders 8 and 9. Keep the tool only as a reference and defer DLX absent new evidence. Tests: Release CTest (9 passed) Tests: Python reference tests and compilation checks Tests: independently validated CP-SAT orders 8 and 9 Refs: #5
37 lines
1.3 KiB
CMake
37 lines
1.3 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)
|
|
add_test(NAME reference-support
|
|
COMMAND "${Python3_EXECUTABLE}"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/tests/reference_test.py")
|
|
endif()
|
|
endif()
|