Commit c14b63c2 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

SuperBuild: FFTW use same dir for src and build because autoconf

parent 2eb6f5aa
......@@ -7,11 +7,9 @@ if(USE_SYSTEM_FFTW)
message(STATUS " Using FFTW system version")
else()
SETUP_SUPERBUILD(PROJECT FFTW)
set(projFloat FFTWF)
set(projDouble FFTWD)
set(FFTW_SB_BUILD_FLOAT_DIR ${CMAKE_BINARY_DIR}/FFTW/src/${projFloat})
set(FFTW_SB_BUILD_DOUBLE_DIR ${CMAKE_BINARY_DIR}/FFTW/src/${projDouble})
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
......@@ -19,17 +17,19 @@ else()
add_custom_target(FFTW)
else()
message(STATUS " Using FFTW SuperBuild version")
# Compile the float version of FFTW
ExternalProject_Add(${projFloat}
PREFIX FFTW
ExternalProject_Add(FFTWF
PREFIX FFTW/FFTWF
URL "http://www.fftw.org/fftw-3.3.4.tar.gz"
URL_MD5 2edab8c06b24feeb3b82bbb3ebf3e7b3
SOURCE_DIR ${FFTW_SB_BUILD_FLOAT_DIR}
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}
${FFTW_SB_BUILD_FLOAT_DIR}/configure
${FFTWF_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX}
--enable-shared
--disable-static
......@@ -39,49 +39,29 @@ else()
DEPENDS ${FFTW_DEPENDENCIES}
)
#ExternalProject_Add_Step(${projFloat} copy_source
# COMMAND ${CMAKE_COMMAND} -E copy_directory
# ${FFTW_SB_SRC} ${FFTW_SB_BUILD_FLOAT_DIR}
# DEPENDEES patch update
# DEPENDERS configure
# )
# Compile the double version of FFTW
ExternalProject_Add(FFTW
PREFIX FFTW
ExternalProject_Add(FFTWD
PREFIX FFTW/FFTWD
URL "http://www.fftw.org/fftw-3.3.4.tar.gz"
URL_MD5 2edab8c06b24feeb3b82bbb3ebf3e7b3
SOURCE_DIR ${FFTW_SB_BUILD_DOUBLE_DIR}
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}
${FFTW_SB_BUILD_DOUBLE_DIR}/configure
${FFTWD_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX}
--enable-shared
--disable-static
--disable-float
--enable-threads
--disable-fortran
DEPENDS ${FFTW_DEPENDENCIES}
)
#ExternalProject_Add_Step(${projDouble} copy_source
# COMMAND ${CMAKE_COMMAND} -E copy_directory
# ${FFTW_SB_SRC} ${FFTW_SB_BUILD_DOUBLE_DIR}
# DEPENDEES patch update
# DEPENDERS configure
# )
add_dependencies(FFTW ${projFloat})
FIX_RPATH_FOR_AUTOCONF_BUILD(FFTW "libfftw3*dylib")
set(_SB_FFTW_INCLUDE_PATH ${SB_INSTALL_PREFIX}/include)
endif()
endif()
endif()
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