<commit_before>INCLUDE_ONCE_MACRO(FFTW)

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
  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
  DEPENDS ${FFTW_DEPENDENCIES}
  )

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
  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
  )


SUPERBUILD_PATCH_SOURCE(FFTWD)

ExternalProject_Add(FFTW
  PREFIX FFTW
  DOWNLOAD_COMMAND ""
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ""
  INSTALL_COMMAND ""
  DEPENDS FFTWF FFTWD
  )

set(_SB_FFTW_INCLUDE_PATH ${SB_INSTALL_PREFIX}/include)<commit_msg>BUG: Mantis-1175: avoid parallel install of FFTWF and FFTWD<commit_after>INCLUDE_ONCE_MACRO(FFTW)

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
  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
  DEPENDS ${FFTW_DEPENDENCIES}
  )

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
  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
  DEPENDS FFTWF
  )


SUPERBUILD_PATCH_SOURCE(FFTWD)

ExternalProject_Add(FFTW
  PREFIX FFTW
  DOWNLOAD_COMMAND ""
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ""
  INSTALL_COMMAND ""
  DEPENDS FFTWD
  )

set(_SB_FFTW_INCLUDE_PATH ${SB_INSTALL_PREFIX}/include)
{'fraction_non_alphanumeric': 0.10448179271708684, 'fraction_numerical': 0.020168067226890758, 'mean_word_length': 4.768982229402262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1195050', 'n_tokens_mistral': 1575, 'n_tokens_neox': 1468, 'n_words': 222}