# CS-03 library management, 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  titles and copies, loans, renewals, fines, one hold per title,
#           repositories with an in-memory store
#   step-2  change: a queue of holds per title

foreach(step IN ITEMS 1 2)
  add_library(cs_library_step${step} STATIC
    step-${step}/types.cpp step-${step}/copy.cpp step-${step}/library.cpp)
  target_include_directories(cs_library_step${step} PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/step-${step})
  lld_add_test(cs_library_step${step}_tests
    SOURCES step-${step}/tests/test_step${step}.cpp LABELS unit)
  target_link_libraries(cs_library_step${step}_tests PRIVATE cs_library_step${step})
  lld_add_example(cs_library_step${step}_demo SOURCES step-${step}/main.cpp
    EXPECTED_OUTPUT step-${step}/expected_output.txt)
  target_link_libraries(cs_library_step${step}_demo PRIVATE cs_library_step${step})
endforeach()
