# CS-16 parcel locker, built in steps. Each step is the whole program at
# that point in the study, and is built and tested on its own.
#   step-1  compartments of three sizes, smallest-fit assignment, single-use
#           pickup codes that expire, courier and customer operations
#   step-2  changes: a larger compartment when the parcel's size is full,
#           and listeners told about deposits, pickups, and expiries
foreach(step IN ITEMS 1 2)
  add_library(cs_locker_step${step} STATIC step-${step}/locker_bank.cpp)
  target_include_directories(cs_locker_step${step} PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/step-${step})
  lld_add_test(cs_locker_step${step}_tests
    SOURCES step-${step}/tests/test_step${step}.cpp LABELS unit)
  target_link_libraries(cs_locker_step${step}_tests PRIVATE cs_locker_step${step})
  lld_add_example(cs_locker_step${step}_demo SOURCES step-${step}/main.cpp
    EXPECTED_OUTPUT step-${step}/expected_output.txt)
  target_link_libraries(cs_locker_step${step}_demo PRIVATE cs_locker_step${step})
endforeach()
