Update build

This commit is contained in:
simon987 2023-06-11 07:53:00 -04:00
parent 8e025a6416
commit 54f7fc5613
4 changed files with 311 additions and 230 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
import timeit import timeit
import sys import sys
@ -6,9 +6,11 @@ IMAGE = sys.argv[1]
COUNT = 20 COUNT = 20
SIZE = 8 SIZE = 8
def print_result(method, time): def print_result(method, time):
print("%s_%s,%d" % (IMAGE, method, time / COUNT * 1000000000)) print("%s_%s,%d" % (IMAGE, method, time / COUNT * 1000000000))
print_result("phash", timeit.timeit( print_result("phash", timeit.timeit(
setup="from imagehash import phash \n" setup="from imagehash import phash \n"
"from PIL import Image", "from PIL import Image",
@ -36,4 +38,3 @@ print_result("ahash", timeit.timeit(
stmt="average_hash(Image.open('%s'), hash_size=%d)" % (IMAGE, SIZE), stmt="average_hash(Image.open('%s'), hash_size=%d)" % (IMAGE, SIZE),
number=COUNT number=COUNT
)) ))

View File

@ -15,7 +15,7 @@ files = (
) )
for f in files: for f in files:
out = check_output(["python", "benchmark.py", f]) out = check_output(["python3", "benchmark.py", f])
print(out.decode(), end="") print(out.decode(), end="")
print() print()

532
cmake/FindFFTW.cmake vendored
View File

@ -37,285 +37,362 @@
# TODO: put on conda-forge # TODO: put on conda-forge
if( NOT FFTW_ROOT AND DEFINED ENV{FFTWDIR} ) if (NOT FFTW_ROOT AND DEFINED ENV{FFTWDIR})
set( FFTW_ROOT $ENV{FFTWDIR} ) set(FFTW_ROOT $ENV{FFTWDIR})
endif() endif ()
# Check if we can use PkgConfig # Check if we can use PkgConfig
find_package(PkgConfig) find_package(PkgConfig)
#Determine from PKG #Determine from PKG
if( PKG_CONFIG_FOUND AND NOT FFTW_ROOT ) if (PKG_CONFIG_FOUND AND NOT FFTW_ROOT)
pkg_check_modules( PKG_FFTW QUIET "fftw3" ) pkg_check_modules(PKG_FFTW QUIET "fftw3")
endif() endif ()
#Check whether to search static or dynamic libs #Check whether to search static or dynamic libs
set( CMAKE_FIND_LIBRARY_SUFFIXES_SAV ${CMAKE_FIND_LIBRARY_SUFFIXES} ) set(CMAKE_FIND_LIBRARY_SUFFIXES_SAV ${CMAKE_FIND_LIBRARY_SUFFIXES})
if( ${FFTW_USE_STATIC_LIBS} ) if (${FFTW_USE_STATIC_LIBS})
set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX} ) set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
else() else ()
set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV} ) set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV})
endif() endif ()
if( FFTW_ROOT ) if (FFTW_ROOT)
# find libs # find libs
find_library( find_library(
FFTW_DOUBLE_LIB FFTW_DOUBLE_LIB
NAMES "fftw3" libfftw3-3 NAMES "fftw3" libfftw3-3
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library( find_library(
FFTW_DOUBLE_THREADS_LIB FFTW_DOUBLE_THREADS_LIB
NAMES "fftw3_threads" NAMES "fftw3_threads"
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library( find_library(
FFTW_DOUBLE_OPENMP_LIB FFTW_DOUBLE_OPENMP_LIB
NAMES "fftw3_omp" NAMES "fftw3_omp"
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library( find_library(
FFTW_FLOAT_LIB FFTW_DOUBLE_MPI_LIB
NAMES "fftw3f" libfftw3f-3 NAMES "fftw3_mpi"
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library( find_library(
FFTW_FLOAT_THREADS_LIB FFTW_FLOAT_LIB
NAMES "fftw3f_threads" NAMES "fftw3f" libfftw3f-3
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library( find_library(
FFTW_FLOAT_OPENMP_LIB FFTW_FLOAT_THREADS_LIB
NAMES "fftw3f_omp" NAMES "fftw3f_threads"
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library( find_library(
FFTW_LONGDOUBLE_LIB FFTW_FLOAT_OPENMP_LIB
NAMES "fftw3l" libfftw3l-3 NAMES "fftw3f_omp"
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library( find_library(
FFTW_LONGDOUBLE_THREADS_LIB FFTW_FLOAT_MPI_LIB
NAMES "fftw3l_threads" NAMES "fftw3f_mpi"
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library( find_library(
FFTW_LONGDOUBLE_OPENMP_LIB FFTW_LONGDOUBLE_LIB
NAMES "fftw3l_omp" NAMES "fftw3l" libfftw3l-3
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
#find includes find_library(
find_path(FFTW_INCLUDE_DIRS FFTW_LONGDOUBLE_THREADS_LIB
NAMES "fftw3.h" NAMES "fftw3l_threads"
PATHS ${FFTW_ROOT} PATHS ${FFTW_ROOT}
PATH_SUFFIXES "include" PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
else() find_library(
FFTW_LONGDOUBLE_OPENMP_LIB
NAMES "fftw3l_omp"
PATHS ${FFTW_ROOT}
PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH
)
find_library( find_library(
FFTW_DOUBLE_LIB FFTW_LONGDOUBLE_MPI_LIB
NAMES "fftw3" NAMES "fftw3l_mpi"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR} PATHS ${FFTW_ROOT}
) PATH_SUFFIXES "lib" "lib64"
NO_DEFAULT_PATH
)
find_library( #find includes
FFTW_DOUBLE_THREADS_LIB find_path(FFTW_INCLUDE_DIRS
NAMES "fftw3_threads" NAMES "fftw3.h"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR} PATHS ${FFTW_ROOT}
) PATH_SUFFIXES "include"
NO_DEFAULT_PATH
)
find_library( else ()
FFTW_DOUBLE_OPENMP_LIB
NAMES "fftw3_omp"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
)
find_library( find_library(
FFTW_FLOAT_LIB FFTW_DOUBLE_LIB
NAMES "fftw3f" NAMES "fftw3"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR} PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
) )
find_library( find_library(
FFTW_FLOAT_THREADS_LIB FFTW_DOUBLE_THREADS_LIB
NAMES "fftw3f_threads" NAMES "fftw3_threads"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR} PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
) )
find_library( find_library(
FFTW_FLOAT_OPENMP_LIB FFTW_DOUBLE_OPENMP_LIB
NAMES "fftw3f_omp" NAMES "fftw3_omp"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR} PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
) )
find_library( find_library(
FFTW_LONGDOUBLE_LIB FFTW_DOUBLE_MPI_LIB
NAMES "fftw3l" NAMES "fftw3_mpi"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR} PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
) )
find_library( find_library(
FFTW_LONGDOUBLE_THREADS_LIB FFTW_FLOAT_LIB
NAMES "fftw3l_threads" NAMES "fftw3f"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR} PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
) )
find_library(FFTW_LONGDOUBLE_OPENMP_LIB find_library(
NAMES "fftw3l_omp" FFTW_FLOAT_THREADS_LIB
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR} NAMES "fftw3f_threads"
) PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
)
find_path(FFTW_INCLUDE_DIRS find_library(
NAMES "fftw3.h" FFTW_FLOAT_OPENMP_LIB
PATHS ${PKG_FFTW_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR} NAMES "fftw3f_omp"
) PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
)
endif( FFTW_ROOT ) find_library(
FFTW_FLOAT_MPI_LIB
NAMES "fftw3f_mpi"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
)
find_library(
FFTW_LONGDOUBLE_LIB
NAMES "fftw3l"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
)
find_library(
FFTW_LONGDOUBLE_THREADS_LIB
NAMES "fftw3l_threads"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
)
find_library(FFTW_LONGDOUBLE_OPENMP_LIB
NAMES "fftw3l_omp"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
)
find_library(FFTW_LONGDOUBLE_MPI_LIB
NAMES "fftw3l_mpi"
PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
)
find_path(FFTW_INCLUDE_DIRS
NAMES "fftw3.h"
PATHS ${PKG_FFTW_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR}
)
endif (FFTW_ROOT)
#--------------------------------------- components #--------------------------------------- components
if (FFTW_DOUBLE_LIB) if (FFTW_DOUBLE_LIB)
set(FFTW_DOUBLE_LIB_FOUND TRUE) set(FFTW_DOUBLE_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_LIB})
add_library(FFTW::Double INTERFACE IMPORTED) add_library(FFTW::Double INTERFACE IMPORTED)
set_target_properties(FFTW::Double set_target_properties(FFTW::Double
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_DOUBLE_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_DOUBLE_LIB}"
) )
else() else ()
set(FFTW_DOUBLE_LIB_FOUND FALSE) set(FFTW_DOUBLE_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_FLOAT_LIB) if (FFTW_FLOAT_LIB)
set(FFTW_FLOAT_LIB_FOUND TRUE) set(FFTW_FLOAT_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_LIB})
add_library(FFTW::Float INTERFACE IMPORTED) add_library(FFTW::Float INTERFACE IMPORTED)
set_target_properties(FFTW::Float set_target_properties(FFTW::Float
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_FLOAT_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_FLOAT_LIB}"
) )
else() else ()
set(FFTW_FLOAT_LIB_FOUND FALSE) set(FFTW_FLOAT_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_LONGDOUBLE_LIB) if (FFTW_LONGDOUBLE_LIB)
set(FFTW_LONGDOUBLE_LIB_FOUND TRUE) set(FFTW_LONGDOUBLE_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_LIB})
add_library(FFTW::LongDouble INTERFACE IMPORTED) add_library(FFTW::LongDouble INTERFACE IMPORTED)
set_target_properties(FFTW::LongDouble set_target_properties(FFTW::LongDouble
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_LONGDOUBLE_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_LONGDOUBLE_LIB}"
) )
else() else ()
set(FFTW_LONGDOUBLE_LIB_FOUND FALSE) set(FFTW_LONGDOUBLE_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_DOUBLE_THREADS_LIB) if (FFTW_DOUBLE_THREADS_LIB)
set(FFTW_DOUBLE_THREADS_LIB_FOUND TRUE) set(FFTW_DOUBLE_THREADS_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_THREADS_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_THREADS_LIB})
add_library(FFTW::DoubleThreads INTERFACE IMPORTED) add_library(FFTW::DoubleThreads INTERFACE IMPORTED)
set_target_properties(FFTW::DoubleThreads set_target_properties(FFTW::DoubleThreads
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_DOUBLETHREADS_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_DOUBLE_THREADS_LIB}"
) )
else() else ()
set(FFTW_DOUBLE_THREADS_LIB_FOUND FALSE) set(FFTW_DOUBLE_THREADS_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_FLOAT_THREADS_LIB) if (FFTW_FLOAT_THREADS_LIB)
set(FFTW_FLOAT_THREADS_LIB_FOUND TRUE) set(FFTW_FLOAT_THREADS_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_THREADS_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_THREADS_LIB})
add_library(FFTW::FloatThreads INTERFACE IMPORTED) add_library(FFTW::FloatThreads INTERFACE IMPORTED)
set_target_properties(FFTW::FloatThreads set_target_properties(FFTW::FloatThreads
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_FLOAT_THREADS_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_FLOAT_THREADS_LIB}"
) )
else() else ()
set(FFTW_FLOAT_THREADS_LIB_FOUND FALSE) set(FFTW_FLOAT_THREADS_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_LONGDOUBLE_THREADS_LIB) if (FFTW_LONGDOUBLE_THREADS_LIB)
set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND TRUE) set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_THREADS_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_THREADS_LIB})
add_library(FFTW::LongDoubleThreads INTERFACE IMPORTED) add_library(FFTW::LongDoubleThreads INTERFACE IMPORTED)
set_target_properties(FFTW::LongDoubleThreads set_target_properties(FFTW::LongDoubleThreads
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_LONGDOUBLE_THREADS_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_LONGDOUBLE_THREADS_LIB}"
) )
else() else ()
set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND FALSE) set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_DOUBLE_OPENMP_LIB) if (FFTW_DOUBLE_OPENMP_LIB)
set(FFTW_DOUBLE_OPENMP_LIB_FOUND TRUE) set(FFTW_DOUBLE_OPENMP_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_OPENMP_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_OPENMP_LIB})
add_library(FFTW::DoubleOpenMP INTERFACE IMPORTED) add_library(FFTW::DoubleOpenMP INTERFACE IMPORTED)
set_target_properties(FFTW::DoubleOpenMP set_target_properties(FFTW::DoubleOpenMP
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_DOUBLE_OPENMP_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_DOUBLE_OPENMP_LIB}"
) )
else() else ()
set(FFTW_DOUBLE_OPENMP_LIB_FOUND FALSE) set(FFTW_DOUBLE_OPENMP_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_FLOAT_OPENMP_LIB) if (FFTW_FLOAT_OPENMP_LIB)
set(FFTW_FLOAT_OPENMP_LIB_FOUND TRUE) set(FFTW_FLOAT_OPENMP_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_OPENMP_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_OPENMP_LIB})
add_library(FFTW::FloatOpenMP INTERFACE IMPORTED) add_library(FFTW::FloatOpenMP INTERFACE IMPORTED)
set_target_properties(FFTW::FloatOpenMP set_target_properties(FFTW::FloatOpenMP
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_FLOAT_OPENMP_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_FLOAT_OPENMP_LIB}"
) )
else() else ()
set(FFTW_FLOAT_OPENMP_LIB_FOUND FALSE) set(FFTW_FLOAT_OPENMP_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_LONGDOUBLE_OPENMP_LIB) if (FFTW_LONGDOUBLE_OPENMP_LIB)
set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND TRUE) set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_OPENMP_LIB}) set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_OPENMP_LIB})
add_library(FFTW::LongDoubleOpenMP INTERFACE IMPORTED) add_library(FFTW::LongDoubleOpenMP INTERFACE IMPORTED)
set_target_properties(FFTW::LongDoubleOpenMP set_target_properties(FFTW::LongDoubleOpenMP
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}" PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_LONGDOUBLE_OPENMP_LIB}" INTERFACE_LINK_LIBRARIES "${FFTW_LONGDOUBLE_OPENMP_LIB}"
) )
else() else ()
set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND FALSE) set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND FALSE)
endif() endif ()
if (FFTW_DOUBLE_MPI_LIB)
set(FFTW_DOUBLE_MPI_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_MPI_LIB})
add_library(FFTW::DoubleMPI INTERFACE IMPORTED)
set_target_properties(FFTW::DoubleMPI
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_DOUBLE_MPI_LIB}"
)
else ()
set(FFTW_DOUBLE_MPI_LIB_FOUND FALSE)
endif ()
if (FFTW_FLOAT_MPI_LIB)
set(FFTW_FLOAT_MPI_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_MPI_LIB})
add_library(FFTW::FloatMPI INTERFACE IMPORTED)
set_target_properties(FFTW::FloatMPI
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_FLOAT_MPI_LIB}"
)
else ()
set(FFTW_FLOAT_MPI_LIB_FOUND FALSE)
endif ()
if (FFTW_LONGDOUBLE_MPI_LIB)
set(FFTW_LONGDOUBLE_MPI_LIB_FOUND TRUE)
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_MPI_LIB})
add_library(FFTW::LongDoubleMPI INTERFACE IMPORTED)
set_target_properties(FFTW::LongDoubleMPI
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${FFTW_LONGDOUBLE_MPI_LIB}"
)
else ()
set(FFTW_LONGDOUBLE_MPI_LIB_FOUND FALSE)
endif ()
#--------------------------------------- end components #--------------------------------------- end components
set( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV} ) set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV})
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
@ -336,4 +413,7 @@ mark_as_advanced(
FFTW_FLOAT_OPENMP_LIB FFTW_FLOAT_OPENMP_LIB
FFTW_DOUBLE_OPENMP_LIB FFTW_DOUBLE_OPENMP_LIB
FFTW_LONGDOUBLE_OPENMP_LIB FFTW_LONGDOUBLE_OPENMP_LIB
) FFTW_FLOAT_MPI_LIB
FFTW_DOUBLE_MPI_LIB
FFTW_LONGDOUBLE_MPI_LIB
)

@ -1 +1 @@
Subproject commit 0811f1d782455b3c80285bebf934a7045d845ed3 Subproject commit 604f6fd3f4b34a84ec4eb4db81d842fa4db829cd