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) ...@@ -7,11 +7,9 @@ if(USE_SYSTEM_FFTW)
message(STATUS " Using FFTW system version") message(STATUS " Using FFTW system version")
else() else()
SETUP_SUPERBUILD(PROJECT FFTW) SETUP_SUPERBUILD(PROJECT FFTW)
set(projFloat FFTWF)
set(projDouble FFTWD)
set(FFTW_SB_BUILD_FLOAT_DIR ${CMAKE_BINARY_DIR}/FFTW/src/${projFloat}) set(FFTWF_SB_SRC ${CMAKE_BINARY_DIR}/FFTW/src/FFTWF)
set(FFTW_SB_BUILD_DOUBLE_DIR ${CMAKE_BINARY_DIR}/FFTW/src/${projDouble}) set(FFTWD_SB_SRC ${CMAKE_BINARY_DIR}/FFTW/src/FFTWD)
if(MSVC) if(MSVC)
# TODO : get precompiled binaries as not all MSVC versions can compile FFTW # TODO : get precompiled binaries as not all MSVC versions can compile FFTW
...@@ -19,17 +17,19 @@ else() ...@@ -19,17 +17,19 @@ else()
add_custom_target(FFTW) add_custom_target(FFTW)
else() else()
message(STATUS " Using FFTW SuperBuild version") message(STATUS " Using FFTW SuperBuild version")
# Compile the float version of FFTW # Compile the float version of FFTW
ExternalProject_Add(${projFloat} ExternalProject_Add(FFTWF
PREFIX FFTW PREFIX FFTW/FFTWF
URL "http://www.fftw.org/fftw-3.3.4.tar.gz" URL "http://www.fftw.org/fftw-3.3.4.tar.gz"
URL_MD5 2edab8c06b24feeb3b82bbb3ebf3e7b3 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} INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION} DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD} ${SB_ENV_CONFIGURE_CMD}
${FFTW_SB_BUILD_FLOAT_DIR}/configure ${FFTWF_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX} --prefix=${SB_INSTALL_PREFIX}
--enable-shared --enable-shared
--disable-static --disable-static
...@@ -39,49 +39,29 @@ else() ...@@ -39,49 +39,29 @@ else()
DEPENDS ${FFTW_DEPENDENCIES} 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 # Compile the double version of FFTW
ExternalProject_Add(FFTW ExternalProject_Add(FFTWD
PREFIX FFTW PREFIX FFTW/FFTWD
URL "http://www.fftw.org/fftw-3.3.4.tar.gz" URL "http://www.fftw.org/fftw-3.3.4.tar.gz"
URL_MD5 2edab8c06b24feeb3b82bbb3ebf3e7b3 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} INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION} DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND CONFIGURE_COMMAND
${SB_ENV_CONFIGURE_CMD} ${SB_ENV_CONFIGURE_CMD}
${FFTW_SB_BUILD_DOUBLE_DIR}/configure ${FFTWD_SB_SRC}/configure
--prefix=${SB_INSTALL_PREFIX} --prefix=${SB_INSTALL_PREFIX}
--enable-shared --enable-shared
--disable-static --disable-static
--disable-float --disable-float
--enable-threads --enable-threads
--disable-fortran --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) set(_SB_FFTW_INCLUDE_PATH ${SB_INSTALL_PREFIX}/include)
endif() endif()
endif() endif()
endif() endif()
Supports Markdown
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