~ubuntu-branches/debian/stretch/adios/stretch

« back to all changes in this revision

Viewing changes to wrappers/numpy/Modules/FindMPI4Py.cmake

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2014-06-16 23:06:38 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20140616230638-5a0z7ylxx8i0edrg
Tags: 1.7.0-1
* New upstream release.
* Add adios.pc pkgconfig file. adios_config now uses this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copied from FindNumpy.cmake
2
 
# ---
3
 
#
4
 
# $Id: $
5
 
#
6
 
# Author(s):  Anton Deguet
7
 
# Created on: 2010-01-20
8
 
#
9
 
# (C) Copyright 2010 Johns Hopkins University (JHU), All Rights
10
 
# Reserved.
11
 
#
12
 
# --- begin cisst license - do not edit ---
13
 
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.
17
 
18
 
# --- end cisst license ---
19
 
#
20
 
# File based on FindNUMARRAY distributed with ITK 3.4 (see itk.org)
21
 
#
22
 
# Main modifications:
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
28
 
#
29
 
# ---
30
 
#
31
 
# Try to find mpi4py python package
32
 
# Once done this will define
33
 
#
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
36
 
#
37
 
#
38
 
 
39
 
# include this to handle the QUIETLY and REQUIRED arguments
40
 
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
41
 
include(GetPrerequisites)
42
 
 
43
 
if(PYTHON_EXECUTABLE)
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
48
 
                 )
49
 
endif(PYTHON_EXECUTABLE)
50
 
 
51
 
find_path(PYTHON_MPI4PY_INCLUDE_DIR mpi4py/mpi4py.h
52
 
          "${MPI4PY_PATH}"
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"
59
 
    )
60
 
 
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)
64
 
 
65
 
find_package_handle_standard_args(PYTHON_MPI4PY DEFAULT_MSG PYTHON_MPI4PY_INCLUDE_DIR)