include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
configure_file(TestConfig.h.in TestConfig.h ESCAPE_QUOTES)

add_library(TestFramework TestFramework.cpp)

add_executable(t_text_file_equal t_text_file_equal.cpp)
target_link_libraries(t_text_file_equal
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(text_file_equal t_text_file_equal)

add_executable(t_kmer_nt5_16 t_kmer_nt5_16.cpp)
target_link_libraries(t_kmer_nt5_16
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(kmer_nt5_16 t_kmer_nt5_16)

add_executable(t_kmer_nt5_32 t_kmer_nt5_32.cpp)
target_link_libraries(t_kmer_nt5_32
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(kmer_nt5_32 t_kmer_nt5_32)

add_executable(t_kmer_nt5_64 t_kmer_nt5_64.cpp)
target_link_libraries(t_kmer_nt5_64
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(kmer_nt5_64 t_kmer_nt5_64)

add_executable(t_kmer_nt4_16 t_kmer_nt4_16.cpp)
target_link_libraries(t_kmer_nt4_16
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(kmer_nt4_16 t_kmer_nt4_16)

add_executable(t_kmer_nt4_32 t_kmer_nt4_32.cpp)
target_link_libraries(t_kmer_nt4_32
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(kmer_nt4_32 t_kmer_nt4_32)

add_executable(t_kmer_nt4_64 t_kmer_nt4_64.cpp)
target_link_libraries(t_kmer_nt4_64
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(kmer_nt4_64 t_kmer_nt4_64)

add_executable(t_kmer_aa t_kmer_aa.cpp)
target_link_libraries(t_kmer_aa
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(kmer_aa t_kmer_aa)

add_executable(t_ref_counted t_ref_counted.cpp)
target_link_libraries(t_ref_counted
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ref_counted t_ref_counted)

add_executable(t_simple_seq t_simple_seq.cpp)
target_link_libraries(t_simple_seq
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(simple_seq t_simple_seq)

add_executable(t_plain_file_handle t_plain_file_handle.cpp)
target_link_libraries(t_plain_file_handle
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(plain_file_handle t_plain_file_handle)

add_executable(t_gzip_file_handle t_gzip_file_handle.cpp)
target_link_libraries(t_gzip_file_handle
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(gzip_file_handle t_gzip_file_handle)

add_executable(t_fastq_io t_fastq_io.cpp)
target_link_libraries(t_fastq_io
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(fastq_io t_fastq_io)

add_executable(t_fasta_io t_fasta_io.cpp)
target_link_libraries(t_fasta_io
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(fasta_io t_fasta_io)

add_executable(t_header_util t_header_util.cpp)
target_link_libraries(t_header_util
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(header_util t_header_util)

add_executable(t_multi_seq_file_se t_multi_seq_file_se.cpp)
target_link_libraries(t_multi_seq_file_se
    TestFramework
    ht_common
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(multi_seq_file_se t_multi_seq_file_se)

add_executable(t_multi_seq_file_pe t_multi_seq_file_pe.cpp)
target_link_libraries(t_multi_seq_file_pe
    TestFramework
    ht_common
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(multi_seq_file_pe t_multi_seq_file_pe)

add_executable(t_ht_sample t_ht_sample.cpp)
target_link_libraries(t_ht_sample
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ht_sample t_ht_sample)

add_executable(t_ht_trim t_ht_trim.cpp)
target_link_libraries(t_ht_trim
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ht_trim t_ht_trim)

add_executable(t_ht_rename t_ht_rename.cpp)
target_link_libraries(t_ht_rename
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ht_rename t_ht_rename)

add_executable(t_ht_overlap t_ht_overlap.cpp)
target_link_libraries(t_ht_overlap
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ht_overlap t_ht_overlap)

add_executable(t_ht_filter t_ht_filter.cpp)
target_link_libraries(t_ht_filter
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ht_filter t_ht_filter)

add_executable(t_ht_convert t_ht_convert.cpp)
target_link_libraries(t_ht_convert
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ht_convert t_ht_convert)

add_executable(t_ht_demul t_ht_demul.cpp)
target_link_libraries(t_ht_demul
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ht_demul t_ht_demul)

add_executable(t_ht_lane_tile t_ht_lane_tile.cpp)
target_link_libraries(t_ht_lane_tile
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ht_lane_tile t_ht_lane_tile)

add_executable(t_string t_string.cpp)
target_link_libraries(t_string
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(string t_string)

add_executable(t_cast t_cast.cpp)
target_link_libraries(t_cast
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(cast t_cast)

add_executable(option_parser option_parser.cpp)
target_link_libraries(option_parser
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)

add_executable(t_ring_buffer t_ring_buffer.cpp)
target_link_libraries(t_ring_buffer
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(ring_buffer t_ring_buffer)

add_executable(t_mt19937 t_mt19937.cpp)
target_link_libraries(t_mt19937
    TestFramework
    htio2
    ${juce_dep_libs}
    ${ZLIB_LIBRARIES}
)
add_test(mt19937 t_mt19937)

