COMP: need to add quotes when using get_filename_component otherwise it will try to process NOT FOUND rather than an empty string when MPIEXEC is not found.

This commit is contained in:
Dave Partyka 2009-10-27 13:10:01 -04:00
parent c283fe2d26
commit 39e88bbe99
1 changed files with 2 additions and 2 deletions

View File

@ -106,8 +106,8 @@ find_program(MPIEXEC
# call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin). # call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin).
# This gives us a fairly reliable base directory to search for /bin /lib and /include from. # This gives us a fairly reliable base directory to search for /bin /lib and /include from.
get_filename_component(MPI_BASE_DIR ${MPIEXEC} PATH) get_filename_component(MPI_BASE_DIR "${MPIEXEC}" PATH)
get_filename_component(MPI_BASE_DIR ${MPI_BASE_DIR} PATH) get_filename_component(MPI_BASE_DIR "${MPI_BASE_DIR}" PATH)
# If there is an mpi compiler find it and interogate (farther below) it for the include # If there is an mpi compiler find it and interogate (farther below) it for the include
# and lib dirs otherwise we will continue to search from ${MPI_BASE_DIR}. # and lib dirs otherwise we will continue to search from ${MPI_BASE_DIR}.