[Insight-developers] add include directory for header test?
Matt McCormick
matt.mccormick at kitware.com
Wed Oct 26 02:20:32 EDT 2011
Hi Kris,
On Tue, Oct 25, 2011 at 6:20 PM, Kris Zygmunt <krismz at sci.utah.edu> wrote:
> I am trying to get the new GPU framework to build well on different
> platforms and I am failing to get the ITKGPUCommonHeaderTest1.cxx to compile
> on Linux (for some reason that I don't understand it compiles just fine on
> Snow Leopard, probably something to do with Frameworks). The error is
The header test compiled fine for me without errors, but with a ton of
warnings (gcc-4.6-Linux-Nvidia).
>
> Modules/GPU/Common/include/itkcOclUtil.h:40:23: fatal error CL/opencl.h: No
> such file or directory
>
> In the GPU/Common/test/CMakeLists.txt file, there is
> INCLUDE_DIRECTORIES(${OPENCL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/../)
> which is how the main test programs successfully compile.
>
> Is there a way to have the automatically generated header test also include
> the OPENCL_INCLUDE_DIRS? It seems rather tedious and undesirable to have to
> put every single GPU header file into the exclusion list in
> BuildHeaderTest.py (I also wonder if this is the reason all of the FFT
> headers are in BuildHeaderTest.py, is it just because they aren't including
> the external fft include directories?).
I pushed a fix with some other fixes here:
https://github.com/thewtex/ITK/tree/GPU-Beta-R1
This disables the HeaderTest generation if ITK_USE_GPU is OFF.
CL/opencl.h is in my standard system include path (/usr/include), so I
did not have a problem with that.
I think you may be able to fix the OPENCL_INCLUDE_DIRS problem by adding an
include_directories( ${OPENCL_INCLUDE_DIRS} )
in CMake/ITKModuleHeaderTest.cmake.
BTW, recent ITK convention uses the lower case version of CMake commands.
Thanks,
Matt
More information about the Insight-developers
mailing list