BerengerBerthoul | 8aeb798 | 2020-10-29 14:49:02 +0100 | [diff] [blame] | 1 | find_package(MPI COMPONENTS CXX) |
| 2 | if(MPI_FOUND) |
Viktor Kirilov | 46e3bb3 | 2020-11-04 11:04:59 +0200 | [diff] [blame] | 3 | add_executable(test_mpi main.cpp mpi.cpp) |
| 4 | target_link_libraries(test_mpi doctest ${CMAKE_THREAD_LIBS_INIT} MPI::MPI_CXX) |
BerengerBerthoul | 8aeb798 | 2020-10-29 14:49:02 +0100 | [diff] [blame] | 5 | |
百地 希留耶 | 0a8a06e | 2022-10-02 00:49:55 +0800 | [diff] [blame] | 6 | doctest_add_test(NO_OUTPUT NAME test_mpi COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 3 $<TARGET_FILE:test_mpi>) |
BerengerBerthoul | 8aeb798 | 2020-10-29 14:49:02 +0100 | [diff] [blame] | 7 | endif() |