[Insight-developers] FFT Image Filter Classes Committed:
Ques tion about configuration
William A. Hoffman
billlist at nycap . rr . com
Wed, 15 Oct 2003 15:14:45 -0400
There is a third option that should be the best of both worlds.
If the variable CMAKE_MODULE_PATH is set, then FIND_PACKAGE command
will look there for the FindFFTW.cmake file.
So we can have this:
SET(CMAKE_MODULE_PATH ${ITK_SOURCE_DIR}/CMake)
OPTION(USE_FFTW "Use the FFTW library" OFF)
MARK_AS_ADVANCED(USE_FFTW)
IF( USE_FFTW )
FIND_PACKAGE( FFTW )
ENDIF( USE_FFTW )
Once the FindFFTW.cmake is stable it can be moved into CMake, and
no one needs to change anything. This feature can also be used
to override buggy Find* modules in the current CMake release, because
the FIND_PACKAGE command will look in CMAKE_MODULE_PATH before
looking in the installed cmake files.
-Bill
At 02:25 PM 10/15/2003, Lorensen, William E (Research) wrote:
>The second suggestion, although nicer, means that itk ousers would have to
>update cmake.
>
>Bill
>
>-----Original Message-----
>From: Luis Ibanez [mailto:luis . ibanez at kitware . com]
>Sent: Wednesday, October 15, 2003 9:55 AM
>To: norman-k-williams at uiowa . edu
>Cc: Insight Developers List
>Subject: Re: [Insight-developers] FFT Image Filter Classes Committed:
>Question about configuration
>
>
>
>Hi Kent,
>
>The following CMake commands should be a good starting
>point for adding this advanced option:
>
> OPTION(USE_FFTW "Use the FFTW library" OFF)
> MARK_AS_ADVANCED(USE_FFTW)
> IF( USE_FFTW )
> FIND_PATH(FFTW_INCLUDE fftw.h "/usr/local/include")
> FIND_LIBRARY(FFTW_LIBRARY fftw "/usr/local/lib")
> ENDIF( USE_FFTW )
>
>Where the /usr/local... directories can be a long list
>of typical directories where you would expect to find
>fftw headers and libraries both in Windows and Unix.
>
>You may want to look at the CMakeLists.txt file in the top
>level of the ITK source tree for similar examples.
>
>
>
>A nicer approach for the long term will be to move these
>commands to a CMake Module:
>
> FindFFTW.cmake
>
>to be added to CMake itself. In that case, the lines
>to add in ITK will be something like
>
> OPTION(USE_FFTW "Use the FFTW library" OFF)
> MARK_AS_ADVANCED(USE_FFTW)
> IF( USE_FFTW )
> FIND_PACKAGE( FFTW )
> ENDIF( USE_FFTW )
>
>The great advantage is that the complexity of finding the
>libraries and headers will be factorized in the FindFFTW.cmake
>module.
>
>
>The CMakeLists.txt on the top directory of InsightApplication
>is also a good source of inspiration. Look for example at
>the setup for VTK.
>
>
>
>Regards,
>
>
> Luis
>
>
>---------------------
>Kent Williams wrote:
>> With some trepidation, I just checked in the classes that implement FFT
>> processing wrapped as ITK Image Filters. Trepidation because I always
>seem
>> to break something when I do checkins. I've spent some time trying to
>verify
>> that the code is going to be Kosher on the platforms I have access to.
>>
>> The baseline implementation uses the VNL library FFT routines. I also
>include
>> a class that uses the FFTW library, but does not include any FFTW code at
>> all. The FFTW code only gets used in Testing/Code/Algorithms if the CMake
>
>> boolean USE_FFTW is defined.
>>
>> What I'd like to have happen is for USE_FTTW to be a top-level advanced
>CMake
>> variable. I'd also need FFTW_INCLUDE and FFT_LIBRARY to tell CMake where
>the
>> header and library is. Could someone point me at an example of defining
>and
>> setting advanced variables in the CMakelist files?
>>
>> Thanks!
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk . org
>> http://www . itk . org/mailman/listinfo/insight-developers
>>
>
>
>
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers at itk . org
>http://www . itk . org/mailman/listinfo/insight-developers
>_______________________________________________
>Insight-developers mailing list
>Insight-developers at itk . org
>http://www . itk . org/mailman/listinfo/insight-developers