#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

if(ADIOS2_HAVE_MPI)
  set(extra_test_args EXEC_WRAPPER ${MPIEXEC_COMMAND})
endif()

add_executable(TestSstParamFails TestSstParamFails.cpp)
target_link_libraries(TestSstParamFails adios2::thirdparty::gtest)
gtest_add_tests(TARGET TestSstParamFails ${extra_test_args})

add_executable(TestSstWriterFails TestSstWriterFails.cpp)
target_link_libraries(TestSstWriterFails adios2::thirdparty::gtest)
gtest_add_tests(TARGET TestSstWriterFails ${extra_test_args})

if(ADIOS2_HAVE_MPI)
  target_link_libraries(TestSstParamFails adios2::cxx11_mpi MPI::MPI_C)
  target_link_libraries(TestSstWriterFails adios2::cxx11_mpi MPI::MPI_C)
else()
  target_link_libraries(TestSstParamFails adios2::cxx11)
  target_link_libraries(TestSstWriterFails adios2::cxx11)
endif()

#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

gtest_add_tests_helper(SstParamFails MPI_ALLOW "" Engine.SST. "")
gtest_add_tests_helper(SstWriterFails MPI_ALLOW "" Engine.SST. "")

Add both Serial and MPI tests of SST engine
testing: Add both Serial and MPI tests of SST engine

Convert sst engine tests to `gtest_add_tests_helper` to take advantage
of the infrastructure from commit 042287885 (testing: Teach test helper
functions to add both Serial and MPI tests, 2020-04-30).
