
message(\n${BoldRed}"Now configuring tests for ${CMAKE_PROJECT_NAME}"${ColourReset}\n)

SET(i2MassChroQ_RCCS ../src/i2masschroq.qrc)
qt6_add_resources(i2MassChroQ_RCC_SRCS ${i2MassChroQ_RCCS})

configure_file(${CMAKE_UTILS_PATH}/tests-config.h.cmake.in ${CMAKE_BINARY_DIR}/tests/config.h)

find_package(Catch2 REQUIRED)

set(catch2_only_cpp_SRCS
    test_condor_status.cpp
    test_peptide_label.cpp
    test_project_parameters.cpp
    test_slurm_tandem.cpp
    test_tandem_input.cpp
    ../src/input/mzidentml/msrunlocationreader.cpp
    ../src/input/tandem/tandeminfoparser.cpp
    ../src/core/condor_process/condorqueueparser.cpp
    ../src/core/tandem_run/tandemparameters.cpp
    ../src/input/tandem/tandemparamparser.cpp
    ../src/core/peptidextp.cpp
    ../src/core/labeling/labelingmethod.cpp
    ../src/core/labeling/label.cpp
    ../src/utils/utils.cpp
)

add_executable(catch2-only-tests
    ${catch2_only_cpp_SRCS}
    ${i2MassChroQ_RCC_SRCS}
)

target_link_libraries(catch2-only-tests
    PappsoMSpp::Core
    Catch2::Catch2
    Catch2::Catch2WithMain
    Qt6::Core
    Qt6::Xml
    Qt6::Gui
    Qt6::Qml
    Cutelee::Templates
)

set_property(TARGET catch2-only-tests PROPERTY CXX_STANDARD 17) # we want C++17

  # 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-only-tests "catch2-only-tests")
