blob: 2d929f5fc632e38bbd65e8b7dbbfc81600adba5b [file] [log] [blame]
BerengerBerthoul8aeb7982020-10-29 14:49:02 +01001find_package(MPI COMPONENTS CXX)
2if(MPI_FOUND)
Viktor Kirilov46e3bb32020-11-04 11:04:59 +02003 add_executable(test_mpi main.cpp mpi.cpp)
4 target_link_libraries(test_mpi doctest ${CMAKE_THREAD_LIBS_INIT} MPI::MPI_CXX)
BerengerBerthoul8aeb7982020-10-29 14:49:02 +01005
百地 希留耶0a8a06e2022-10-02 00:49:55 +08006 doctest_add_test(NO_OUTPUT NAME test_mpi COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 3 $<TARGET_FILE:test_mpi>)
BerengerBerthoul8aeb7982020-10-29 14:49:02 +01007endif()