1
# Copied from FindNumpy.cmake
6
# Author(s): Anton Deguet
7
# Created on: 2010-01-20
9
# (C) Copyright 2010 Johns Hopkins University (JHU), All Rights
12
# --- begin cisst license - do not edit ---
14
# This software is provided "as is" under an open source license, with
15
# no warranty. The complete license can be found in license.txt and
16
# http://www.cisst.org/cisst/license.txt.
18
# --- end cisst license ---
20
# File based on FindNUMARRAY distributed with ITK 3.4 (see itk.org)
23
# - use Numpy instead of Numarray for all naming
24
# - added path for Python 2.5 and 2.6
25
# - renamed python script generated (det_npp became determineNumpyPath)
26
# - use lower case for CMake commands and keywords
27
# - updated python script to use get_include, not get_numpy_include which is now deprecated
31
# Try to find mpi4py python package
32
# Once done this will define
34
# PYTHON_MPI4PY_FOUND - system has numpy development package and it should be used
35
# PYTHON_MPI4PY_INCLUDE_DIR - directory where the arrayobject.h header file can be found
39
# include this to handle the QUIETLY and REQUIRED arguments
40
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
41
include(GetPrerequisites)
44
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determineMPI4PyPath.py "try: import mpi4py; print mpi4py.get_include()\nexcept: pass\n")
45
exec_program("${PYTHON_EXECUTABLE}"
46
ARGS "\"${CMAKE_CURRENT_BINARY_DIR}/determineMPI4PyPath.py\""
47
OUTPUT_VARIABLE MPI4PY_PATH
49
endif(PYTHON_EXECUTABLE)
51
find_path(PYTHON_MPI4PY_INCLUDE_DIR mpi4py/mpi4py.h
53
"${PYTHON_INCLUDE_PATH}/mpi4py/"
54
/usr/include/python2.6/mpi4py/
55
/usr/include/python2.5/mpi4py/
56
/usr/include/python2.4/mpi4py/
57
/usr/include/python2.3/mpi4py/
58
DOC "Directory where the mpi4py.h header file can be found. This file is part of the mpi4py package"
61
##if(PYTHON_MPI4PY_INCLUDE_DIR)
62
## set(PYTHON_MPI4PY_FOUND 1 CACHE INTERNAL "Python mpi4py development package is available")
63
##endif(PYTHON_MPI4PY_INCLUDE_DIR)
65
find_package_handle_standard_args(PYTHON_MPI4PY DEFAULT_MSG PYTHON_MPI4PY_INCLUDE_DIR)