# CMake script for PAPPSOms++ library
# Author: Olivier Langella
# Created: 03/03/2015 from the CMakeLists file of the Bio++ project



find_package(Catch2 REQUIRED)


qt6_add_resources(spec_RCC_SRCS "../../src/resources.qrc")

# File list
set(SPOMS_CPP_FILES
    ${CMAKE_SOURCE_DIR}/src/core/spoms/aaposition.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/alignment.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/alignmentbucket.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/complementarypeak.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/interpretationbackup.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/interpretationsaver.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/location.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/locationbackup.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/peptidemodel.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/protein.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/protein_list.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/scenario.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/spomsutils.cpp
    ${CMAKE_SOURCE_DIR}/src/core/spoms/transformedspectrum.cpp
)


# These source files are compiled into a single Catch2-based test binary.
set(catch2_spoms_cpp_SRCS
#    test_pappsotree.cpp
    test_proteinlist.cpp
    test_spoms.cpp
    test_spoms_112.cpp
    test_spoms_1897.cpp
    test_spoms_3340.cpp
    test_spoms_3107.cpp
    test_spoms_4042.cpp
    test_spoms_4291.cpp
    test_spoms_4291_location_backup.cpp
    test_spoms_8838.cpp
    test_spoms_13970.cpp
    test_spoms_15046.cpp
    test_spoms_24160.cpp
    test_spoms_25976.cpp
    test_spoms_52119.cpp
    test_spoms_52144.cpp
    test_spoms_54257.cpp
    test_spoms_57729.cpp
    test_spoms_DATNVGDEGGFAPNIIENK_5.cpp


    test_fine_4291.cpp
    test_transformed_spectrum.cpp
    ../common.cpp
    ${SPOMS_CPP_FILES}
  )

add_executable(catch2-spoms-tests
  ${catch2_spoms_cpp_SRCS}
  ${spec_RCC_SRCS}
)


set(required_target_link_libraries
    PappsoMSpp::Core
    Catch2::Catch2
    Catch2::Catch2WithMain
    Qt6::Core
    Qt6::Widgets
    Qt6::Sql
    Qt6::Qml
    Boost::chrono
)


target_link_libraries(catch2-spoms-tests
  ${required_target_link_libraries})

# Add the Catch2-based single binary test file to the CMake's test suite so
# that it gets called using 'make test'. To see the output, add "ARGS=-V" to
# the call.
add_test(catch2-spoms-tests "catch2-spoms-tests")
