--- FindMPI-2.8.1.cmake 2010-04-29 15:10:05.000000000 +0400 +++ FindMPI.cmake 2010-04-29 15:09:31.000000000 +0400 @@ -153,6 +153,28 @@ endif (MPI_COMPILER_RETURN EQUAL 0) if (MPI_COMPILER_RETURN EQUAL 0) + # Do nothing: we have our command lines now + else () + exec_program(${MPI_COMPILER} + ARGS -compile-info + OUTPUT_VARIABLE MPI_COMPILE_CMDLINE + RETURN_VALUE MPI_COMPILER_RETURN) + + if (MPI_COMPILER_RETURN EQUAL 0) + # If we appear to have -showme:compile, then we should also have + # -showme:link. Try it. + exec_program(${MPI_COMPILER} + ARGS -link-info + OUTPUT_VARIABLE MPI_LINK_CMDLINE + RETURN_VALUE MPI_COMPILER_RETURN) + + # Note that we probably have -showme:incdirs and -showme:libdirs + # as well. + set(MPI_COMPILER_MAY_HAVE_INCLIBDIRS TRUE) + endif (MPI_COMPILER_RETURN EQUAL 0) + endif () + + if (MPI_COMPILER_RETURN EQUAL 0) # Do nothing: we have our command lines now else (MPI_COMPILER_RETURN EQUAL 0) # Older versions of LAM-MPI have "-showme". Try it.