Skip to content

Commit

Permalink
trying to deal with MPIEXEC in CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Aug 26, 2020
1 parent 672259c commit f5906b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ if (NOT WITH_MPIEXEC)
set(WITH_MPIEXEC mpiexec)
endif()
set(MPIEXEC "${WITH_MPIEXEC}" CACHE INTERNAL "")
set_property(GLOBAL PROPERTY WITH_MPIEXEC "${WITH_MPIEXEC}")
cmake_print_variables(MPIEXEC)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/tests/cunit/run_tests.sh.in
Expand Down
7 changes: 6 additions & 1 deletion cmake/LibMPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ function (add_mpi_test TESTNAME)
# Get the platform name
platform_name (PLATFORM)

cmake_print_variables(MPIEXEC exec_file num_procs)
get_property(WITH_MPIEXEC GLOBAL PROPERTY WITH_MPIEXEC)
cmake_print_variables(WITH_MPIEXEC MPIEXEC exec_file num_procs)
if (WITH_MPIEXEC)
set(MPIEXEC "${WITH_MPIEXEC}")
endif ()
cmake_print_variables(WITH_MPIEXEC MPIEXEC exec_file num_procs)

# Default ("unknown" platform) execution
if (PLATFORM STREQUAL "unknown")
Expand Down

0 comments on commit f5906b1

Please sign in to comment.