cmake_minimum_required(VERSION 3.21) add_executable(bench_pipeline bench_pipeline.cpp) target_link_libraries(bench_pipeline PRIVATE kpn) target_compile_options(bench_pipeline PRIVATE -O3 -march=native) # Dispatch microbenchmark (PERF_PLAN B1/B2): ns per ThreadPool dispatch, and # whether a worker actually sleeps per task. No TBB comparison — it measures # KPN's own scheduler, not a competitor. add_executable(bench_dispatch bench_dispatch.cpp) target_link_libraries(bench_dispatch PRIVATE kpn) target_compile_options(bench_dispatch PRIVATE -O3 -march=native) find_package(TBB QUIET) if(TBB_FOUND) target_link_libraries(bench_pipeline PRIVATE TBB::tbb) target_compile_definitions(bench_pipeline PRIVATE KPN_BENCH_TBB=1) message(STATUS "TBB found — enabling TBB benchmarks") else() message(STATUS "TBB not found — TBB benchmarks disabled") endif()