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


configure_file (config.h.cmake ${CMAKE_SOURCE_DIR}/tests/config.h)

find_package(Catch2 REQUIRED)

find_package(Qt5 COMPONENTS Core Xml Gui Concurrent REQUIRED)


set(catch2_only_cpp_SRCS
    test_tandem_input.cpp
    test_condor_status.cpp
    ../src/input/mzidentml/msrunsaxhandler.cpp
    ../src/input/tandem/tandeminfoparser.cpp
    ../src/input/tandem/tandemparamparser.cpp
    ../src/core/tandem_run/tandemparameters.cpp
    ../src/core/condor_process/condorqueueparser.cpp
)

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

target_link_libraries(catch2-only-tests
    Qt5::Core
    Qt5::Xml
    PappsoMSpp::Core
)

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")
