Commit 556c0dce authored by Guillaume Pasero's avatar Guillaume Pasero

SuperBuild: upgrade FFTW to 3.3.8, MSVC support

parent a39cb76d
......@@ -25,34 +25,22 @@ SETUP_SUPERBUILD(FFTW)
set(FFTWF_SB_SRC ${CMAKE_BINARY_DIR}/FFTW/src/FFTWF)
set(FFTWD_SB_SRC ${CMAKE_BINARY_DIR}/FFTW/src/FFTWD)
if(MSVC)
# TODO : get precompiled binaries as not all MSVC versions can compile FFTW
message(STATUS " FFTW SuperBuild is not available yet...")
add_custom_target(FFTW)
return()
endif()
# Compile the float version of FFTW
ExternalProject_Add(FFTWF
PREFIX FFTW/FFTWF
URL "http://www.fftw.org/fftw-3.3.4.tar.gz"
URL_MD5 2edab8c06b24feeb3b82bbb3ebf3e7b3
URL "http://www.fftw.org/fftw-3.3.8.tar.gz"
URL_MD5 8aac833c943d8e90d51b697b27d4384d
SOURCE_DIR ${FFTWF_SB_SRC}
BINARY_DIR ${FFTWF_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD}
${FFTWF_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX}
--enable-shared
--disable-static
--enable-float
--enable-threads
--disable-fortran
--disable-dependency-tracking
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DBUILD_TESTS:BOOL=OFF
-DDISABLE_FORTRAN:BOOL=ON
-DENABLE_THREADS:BOOL=ON
-DENABLE_SSE2:BOOL=ON
-DENABLE_FLOAT:BOOL=ON
DEPENDS ${FFTW_DEPENDENCIES}
LOG_DOWNLOAD 1
LOG_CONFIGURE 1
......@@ -60,27 +48,24 @@ ExternalProject_Add(FFTWF
LOG_INSTALL 1
)
SUPERBUILD_PATCH_SOURCE(FFTWF)
# SUPERBUILD_PATCH_SOURCE(FFTWF)
# Compile the double version of FFTW
ExternalProject_Add(FFTWD
PREFIX FFTW/FFTWD
URL "http://www.fftw.org/fftw-3.3.4.tar.gz"
URL_MD5 2edab8c06b24feeb3b82bbb3ebf3e7b3
URL "http://www.fftw.org/fftw-3.3.8.tar.gz"
URL_MD5 8aac833c943d8e90d51b697b27d4384d
SOURCE_DIR ${FFTWD_SB_SRC}
BINARY_DIR ${FFTWD_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD}
${FFTWD_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX}
--enable-shared
--disable-static
--disable-float
--enable-threads
--disable-fortran
--disable-dependency-tracking
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DBUILD_TESTS:BOOL=OFF
-DDISABLE_FORTRAN:BOOL=ON
-DENABLE_THREADS:BOOL=ON
-DENABLE_SSE2:BOOL=ON
-DENABLE_FLOAT:BOOL=OFF
DEPENDS FFTWF
LOG_DOWNLOAD 1
LOG_CONFIGURE 1
......@@ -88,8 +73,7 @@ ExternalProject_Add(FFTWD
LOG_INSTALL 1
)
SUPERBUILD_PATCH_SOURCE(FFTWD)
# SUPERBUILD_PATCH_SOURCE(FFTWD)
ExternalProject_Add(FFTW
PREFIX FFTW
......
......@@ -124,21 +124,18 @@ ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(ITK ZLIB FFTW)
ADD_SUPERBUILD_CMAKE_VAR(ITK ZLIB_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(ITK ZLIB_LIBRARY)
# By default activate FFTW, but with an external fftw build
# These variables are used in ITK to initialize the value of the ITK_USE_FFTW_XXX options
list(APPEND ITK_SB_CONFIG
-DUSE_FFTWF:BOOL=ON
-DUSE_FFTWD:BOOL=ON
-DUSE_SYSTEM_FFTW:BOOL=ON
)
ADD_SUPERBUILD_CMAKE_VAR(ITK FFTW_INCLUDE_PATH)
if (WIN32)
list(APPEND ITK_SB_CONFIG
-DUSE_FFTWF:BOOL=OFF
-DUSE_FFTWD:BOOL=OFF
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=ON
)
else()
list(APPEND ITK_SB_CONFIG
-DUSE_FFTWF:BOOL=ON
-DUSE_FFTWD:BOOL=ON
-DUSE_SYSTEM_FFTW:BOOL=ON
)
ADD_SUPERBUILD_CMAKE_VAR(ITK FFTW_INCLUDE_PATH)
endif()
#variables are later used in packaging
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment