Skip to content

Commit

Permalink
BUG: CUFFTW paths were not being set and unnecessary FFTW files used
Browse files Browse the repository at this point in the history
FindFFTW sets the FFTW_INCLUDES variable. The FFTW_INCLUDE_PATH var is
specific to FFTW (not used by CUFFTW).

FFTWGlobalConfiguration file is only needed if FFTW is being used,
not if CUFFT is being used.
  • Loading branch information
aylward authored and thewtex committed May 14, 2020
1 parent 355c6cb commit 449c571
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMake/FindFFTW.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF)
find_path(FFTW_INCLUDE_PATH fftw3.h ${FFTW_INC_SEARCHPATH})
endif()

if(FFTW_INCLUDE_PATH)
if(FFTW_INCLUDE_PATH OR CUFFTW_INCLUDE_PATH)
if(ITK_USE_CUFFTW)
file(TO_CMAKE_PATH "${CUFFTW_INCLUDE_PATH}" CUFFTW_INCLUDE_PATH)
set(FFTW_INCLUDE ${CUFFTW_INCLUDE_PATH})
Expand Down
2 changes: 1 addition & 1 deletion Modules/Filtering/FFT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ if(ITK_USE_CUFFTW)
else()
set(ITKFFT_LIBRARIES ITKFFT)
endif()
set(ITKFFT_INCLUDE_DIRS ${FFTW_INCLUDE_PATH})
set(ITKFFT_INCLUDE_DIRS ${FFTW_INCLUDE})
itk_module_impl()
9 changes: 5 additions & 4 deletions Modules/Filtering/FFT/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
set(ITKFFT_SRCS
itkFFTWGlobalConfiguration.cxx
itkComplexToComplexFFTImageFilter.cxx
)
set(ITKFFT_SRCS itkComplexToComplexFFTImageFilter.cxx)

if( ITK_USE_FFTWF OR ITK_USE_FFTWD AND NOT ITK_USE_CUFFTW)
list(APPEND ITKFFT_SRCS itkFFTWGlobalConfiguration.cxx )
endif()

itk_module_add_library(ITKFFT ${ITKFFT_SRCS})

Expand Down

0 comments on commit 449c571

Please sign in to comment.