# Conformance runner, C++ side. Owned by lane PROTO.
#
# Links libveloxproto (the generated protocol code in core/generated/), not libveloxcore:
# this exercises the wire types, which is a separate concern from the engine. See
# docs/adr/0009-generated-protocol-library.md.

add_executable(velox_conformance_cpp
    conformance_main.cpp
    ${CMAKE_SOURCE_DIR}/core/generated/velox_proto.cpp)

target_include_directories(velox_conformance_cpp PRIVATE
    ${CMAKE_SOURCE_DIR}/core/generated
    ${CMAKE_CURRENT_SOURCE_DIR})

target_compile_features(velox_conformance_cpp PRIVATE cxx_std_23)
target_link_libraries(velox_conformance_cpp PRIVATE nlohmann_json::nlohmann_json)

# The runner needs the repository root so it can find contracts/fixtures.
add_test(NAME conformance_cpp
         COMMAND velox_conformance_cpp ${CMAKE_SOURCE_DIR})
