File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ else ()
22
22
target_link_libraries (tests QuEST m)
23
23
endif ()
24
24
25
+ # distributed unit tests must supply an MPI-clue to (modified) catch
26
+ if (${DISTRIBUTED} )
27
+ add_definitions (-DDISTRIBUTED_MODE)
28
+ find_package (MPI REQUIRED)
29
+ include_directories (${MPI_C_INCLUDE_PATH} )
30
+ endif ()
31
+
25
32
# locate Catch2 scripts for CMake
26
33
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /catch)
27
34
include (CTest)
Original file line number Diff line number Diff line change 12
12
#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED
13
13
// start catch.hpp
14
14
15
- /* code injection for the silencing of distributed testing
15
+ /* code injection for the silencing of distributed testing. Requires that when
16
+ * running tests in distributed mode, a compiler constant DISTRIBUTED_MODE must
17
+ * be supplied when processing this file.
16
18
* modified by Tyson Jones, 17th Jan 2020
17
19
*/
18
20
#ifdef DISTRIBUTED_MODE
You can’t perform that action at this time.
0 commit comments