[Cmake-commits] [cmake-commits] partyd committed FindMPI.cmake 1.27 1.28

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Nov 13 10:52:32 EST 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv22797/Modules

Modified Files:
	FindMPI.cmake 
Log Message:
BUG: fix MPI_BASE_DIR var to be called _MPI_BASE_DIR to prevent conflicts with known variable names in other projects.


Index: FindMPI.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindMPI.cmake,v
retrieving revision 1.27
retrieving revision 1.28
diff -C 2 -d -r1.27 -r1.28
*** FindMPI.cmake	27 Oct 2009 17:10:01 -0000	1.27
--- FindMPI.cmake	13 Nov 2009 15:52:28 -0000	1.28
***************
*** 107,118 ****
  # 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.
! get_filename_component(MPI_BASE_DIR "${MPIEXEC}" 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
! # and lib dirs otherwise we will continue to search from ${MPI_BASE_DIR}.
  find_program(MPI_COMPILER
    NAMES mpic++ mpicxx mpiCC mpicc
!   HINTS "${MPI_BASE_DIR}"
    PATH_SUFFIXES bin
    DOC "MPI compiler. Used only to detect MPI compilation flags.")
--- 107,118 ----
  # 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.
! get_filename_component(_MPI_BASE_DIR "${MPIEXEC}" 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
! # and lib dirs otherwise we will continue to search from ${_MPI_BASE_DIR}.
  find_program(MPI_COMPILER
    NAMES mpic++ mpicxx mpiCC mpicc
!   HINTS "${_MPI_BASE_DIR}"
    PATH_SUFFIXES bin
    DOC "MPI compiler. Used only to detect MPI compilation flags.")
***************
*** 223,227 ****
      # paths.
      find_path(MPI_INCLUDE_PATH mpi.h
!   HINTS ${MPI_BASE_DIR} ${MPI_PREFIX_PATH}
    PATH_SUFFIXES include
      )
--- 223,227 ----
      # paths.
      find_path(MPI_INCLUDE_PATH mpi.h
!   HINTS ${_MPI_BASE_DIR} ${MPI_PREFIX_PATH}
    PATH_SUFFIXES include
      )
***************
*** 305,309 ****
  # No MPI compiler to interogate so attempt to find everything with find functions.
    find_path(MPI_INCLUDE_PATH mpi.h
!     HINTS ${MPI_BASE_DIR} ${MPI_PREFIX_PATH}
      PATH_SUFFIXES include
      )
--- 305,309 ----
  # No MPI compiler to interogate so attempt to find everything with find functions.
    find_path(MPI_INCLUDE_PATH mpi.h
!     HINTS ${_MPI_BASE_DIR} ${MPI_PREFIX_PATH}
      PATH_SUFFIXES include
      )
***************
*** 318,322 ****
    find_library(MPI_LIBRARY
      NAMES mpi mpich msmpi
!     HINTS ${MPI_BASE_DIR} ${MPI_PREFIX_PATH}
      PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR}
      )
--- 318,322 ----
    find_library(MPI_LIBRARY
      NAMES mpi mpich msmpi
!     HINTS ${_MPI_BASE_DIR} ${MPI_PREFIX_PATH}
      PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR}
      )
***************
*** 324,328 ****
    find_library(MPI_EXTRA_LIBRARY
      NAMES mpi++
!     HINTS ${MPI_BASE_DIR} ${MPI_PREFIX_PATH}
      PATH_SUFFIXES lib
      DOC "Extra MPI libraries to link against.")
--- 324,328 ----
    find_library(MPI_EXTRA_LIBRARY
      NAMES mpi++
!     HINTS ${_MPI_BASE_DIR} ${MPI_PREFIX_PATH}
      PATH_SUFFIXES lib
      DOC "Extra MPI libraries to link against.")
***************
*** 361,363 ****
  unset(MPI_PACKAGE_DIR)
  unset(MPI_PREFIX_PATH)
! unset(MPI_BASE_DIR)
--- 361,363 ----
  unset(MPI_PACKAGE_DIR)
  unset(MPI_PREFIX_PATH)
! unset(_MPI_BASE_DIR)



More information about the Cmake-commits mailing list