tewarfel / wrapitk

Automatically exported from code.google.com/p/wrapitk
0 stars 0 forks source link

Automatic detection of numpy/numerical in PyBuffer cmake script #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This commit:

http://code.google.com/p/wrapitk/source/detail?r=186

produces this error:

CMake Error at CMakeLists.txt:13 (WRAP_LIBRARY):
  Unknown CMake command "WRAP_LIBRARY".
CMake Error: The following variables are used in this project, but they are
set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake
files:
PYTHON_NUMARRAY_INCLUDE_DIR
   used as include directory in directory
/media/USB-WD-1/dev-ubuntu/itk/WrapITK/ExternalProjects/PyBuffer

As ${NUMPY_PATH} is not set, the hard coded

/usr/share/pyshared/numpy/core/include/numpy/

path is the default on linux, but it seems it's not that standard.

Perhaps more important than automatically detecting the header file is to
prompt the user about the choice between numerric and numpy as they are
different libraries with different performances.

It may not be easy to automate numpy header detection, 

Original issue reported on code.google.com by Tondd...@gmail.com on 14 Jan 2009 at 11:57

GoogleCodeExporter commented 9 years ago
numpy.get_include() is the standard method to find numpy headers.
Perhaps your problem comes from the non detected WrapITK dir?

Also, numeric and numarray are both older libraries which should be replaced by
numpy. I don't think we should care about choosing one or the other.

Original comment by gaetan.l...@gmail.com on 15 Jan 2009 at 9:23

GoogleCodeExporter commented 9 years ago
You're right, wrapitk dir was not found and it didn't warn me about it. Now 
numpy
include path is well detected!

Original comment by Tondd...@gmail.com on 15 Jan 2009 at 10:33

GoogleCodeExporter commented 9 years ago

Original comment by Tondd...@gmail.com on 15 Jan 2009 at 10:40