|
From: <ai...@us...> - 2009-07-27 18:16:52
|
Revision: 10182
http://plplot.svn.sourceforge.net/plplot/?rev=10182&view=rev
Author: airwin
Date: 2009-07-27 18:16:35 +0000 (Mon, 27 Jul 2009)
Log Message:
-----------
For numpy case switch from assuming python's numpy.get_include() will
_always_ find the parent of the numpy directory where arrayobject.h is
found, to using the numpy.get_include() result (with numpy directory
appended) as the first place that find_path searches for arrayobject.h.
This gives the user the option of using CMAKE_INCLUDE_PATH to help find
arrayobject.h for unusual numpy installations.
Modified Paths:
--------------
trunk/cmake/modules/python.cmake
Modified: trunk/cmake/modules/python.cmake
===================================================================
--- trunk/cmake/modules/python.cmake 2009-07-26 23:13:35 UTC (rev 10181)
+++ trunk/cmake/modules/python.cmake 2009-07-27 18:16:35 UTC (rev 10182)
@@ -77,9 +77,14 @@
endif(NUMPY_ERR)
endif(HAVE_NUMPY)
if(HAVE_NUMPY)
- # Set include path to find numpy headers
- set(NUMERIC_INCLUDE_PATH ${NUMPY_INCLUDE_PATH}/numpy CACHE PATH "Path to python Numeric/numpy include files")
- set(PYTHON_NUMERIC_NAME numpy CACHE INTERNAL "")
+ find_path(
+ NUMERIC_INCLUDE_PATH
+ arrayobject.h
+ ${NUMPY_INCLUDE_PATH}/numpy
+ )
+ if(NUMERIC_INCLUDE_PATH)
+ set(PYTHON_NUMERIC_NAME numpy CACHE INTERNAL "")
+ endif(NUMERIC_INCLUDE_PATH)
else(HAVE_NUMPY)
# Check for Python Numeric header in same include path or Numeric
# subdirectory of that path to avoid version mismatch.
@@ -88,7 +93,7 @@
arrayobject.h
${PYTHON_INCLUDE_PATH} ${PYTHON_INCLUDE_PATH}/Numeric
)
- if (NUMERIC_INCLUDE_PATH)
+ if(NUMERIC_INCLUDE_PATH)
set(PYTHON_NUMERIC_NAME Numeric CACHE INTERNAL "")
endif (NUMERIC_INCLUDE_PATH)
endif(HAVE_NUMPY)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|