include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/data)
add_executable(mp_one ${CMAKE_CURRENT_SOURCE_DIR}/data/one/code.cpp)
add_executable(mp_one_mem ${CMAKE_CURRENT_SOURCE_DIR}/data/one.memcheck/code.cpp)
add_executable(mp_two ${CMAKE_CURRENT_SOURCE_DIR}/data/two/code.cpp)
add_executable(mp_two_mem ${CMAKE_CURRENT_SOURCE_DIR}/data/two.memcheck/code.cpp)
add_executable(mp_three ${CMAKE_CURRENT_SOURCE_DIR}/data/three/code.cpp)
add_executable(mp_three_mem ${CMAKE_CURRENT_SOURCE_DIR}/data/three.memcheck/code.cpp)
add_executable(mp_four ${CMAKE_CURRENT_SOURCE_DIR}/data/four/code.cpp)
add_executable(mp_four_mem ${CMAKE_CURRENT_SOURCE_DIR}/data/four.memcheck/code.cpp)
add_executable(mp_five ${CMAKE_CURRENT_SOURCE_DIR}/data/five/code.cpp)
add_executable(mp_five_mem ${CMAKE_CURRENT_SOURCE_DIR}/data/five.memcheck/code.cpp)
add_test(NAME mp_one COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_one >/tmp/one_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/one/answer.txt /tmp/one_out.txt>/tmp/one_diff.txt")
add_test(NAME mp_one_mem COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_one_mem >/tmp/one_mem_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/one.memcheck/answer.txt /tmp/one_mem_out.txt>/tmp/one_mem_diff.txt")
add_test(NAME mp_two COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_two >/tmp/two_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/two/answer.txt /tmp/two_out.txt>/tmp/two_diff.txt")
add_test(NAME mp_two_mem COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_two_mem >/tmp/two_mem_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/two.memcheck/answer.txt /tmp/two_mem_out.txt>/tmp/two_mem_diff.txt")
add_test(NAME mp_three COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_three >/tmp/three_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/three/answer.txt /tmp/three_out.txt>/tmp/three_diff.txt")
add_test(NAME mp_three_mem COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_three_mem >/tmp/three_mem_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/three.memcheck/answer.txt /tmp/three_mem_out.txt>/tmp/three_mem_diff.txt")
add_test(NAME mp_four COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_four >/tmp/four_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/four/answer.txt /tmp/four_out.txt>/tmp/four_diff.txt")
add_test(NAME mp_four_mem COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_four_mem >/tmp/four_mem_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/four.memcheck/answer.txt /tmp/four_mem_out.txt>/tmp/four_mem_diff.txt")
add_test(NAME mp_five COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_five >/tmp/five_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/five/answer.txt /tmp/five_out.txt>/tmp/five_diff.txt")
add_test(NAME mp_five_mem COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/mp_five_mem >/tmp/five_mem_out.txt\
        && diff -u ${CMAKE_CURRENT_SOURCE_DIR}/data/five.memcheck/answer.txt /tmp/five_mem_out.txt>/tmp/five_mem_diff.txt")
add_subdirectory(test)