Skip to content

[bugfix] make `dune_add_test` play nicely with MPICH

Martin Nolte requested to merge bugfix/make-add-test-work-for-mpich into master

The standard add_test allows CMake targets to be passed as commands. However, when passing them to MPI, this does not work in two cases:

  • MPICH does not search for the executable in the current working directory.
  • The name of the executable need not coincide with the name of the target (e.g., on Windows).

This patch fixes both issues by checking whether the command is a CMake target and obtaining the location of the primary output file in this case. This name is then passed to MPI or add_test, respectively.

This closes #24 (closed).

Merge request reports