diff --git a/ports/fftw3/CMakeLists.txt b/ports/fftw3/CMakeLists.txt deleted file mode 100644 index 10c63d710..000000000 --- a/ports/fftw3/CMakeLists.txt +++ /dev/null @@ -1,117 +0,0 @@ -cmake_minimum_required (VERSION 3.0) -project (fftw3) - -# From: http://stackoverflow.com/questions/10252336/fftw-in-visual-studio-2010 - -# Standard: /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR -if (WIN32) - add_definitions(-D_OPENMP -DLIBFFTWF33_EXPORTS /openmp /bigobj) # Visual Studio 2005 and up supports OpenMP -endif (WIN32) - -if (BUILD_SHARED_LIBS) - add_definitions(-DFFTW_DLL) -endif() - - -file(GLOB fftw_api_SOURCE api/*.c api/*.h) -file(GLOB fftw_dft_SOURCE dft/*.c dft/*.h) -file(GLOB fftw_dft_scalar_SOURCE dft/scalar/*.c dft/scalar/*.h) -file(GLOB fftw_dft_scalar_codelets_SOURCE dft/scalar/codelets/*.c dft/scalar/codelets/*.h) -file(GLOB fftw_dft_simd_SOURCE dft/simd/*.c dft/simd/*.h) - -file(GLOB fftw_dft_simd_sse2_SOURCE dft/simd/sse2/*.c dft/simd/sse2/*.h) -file(GLOB fftw_kernel_SOURCE kernel/*.c kernel/*.h) -file(GLOB fftw_rdft_SOURCE rdft/*.c rdft/*.h) -file(GLOB fftw_rdft_scalar_SOURCE rdft/scalar/*.c rdft/scalar/*.h) - -file(GLOB fftw_rdft_scalar_r2cb_SOURCE rdft/scalar/r2cb/*.c - rdft/scalar/r2cb/*.h) -file(GLOB fftw_rdft_scalar_r2cf_SOURCE rdft/scalar/r2cf/*.c - rdft/scalar/r2cf/*.h) -file(GLOB fftw_rdft_scalar_r2r_SOURCE rdft/scalar/r2r/*.c - rdft/scalar/r2r/*.h) - -file(GLOB fftw_rdft_simd_SOURCE rdft/simd/*.c rdft/simd/*.h) -file(GLOB fftw_rdft_simd_sse2_SOURCE rdft/simd/sse2/*.c rdft/simd/sse2/*.h) - -file(GLOB fftw_reodft_SOURCE reodft/*.c reodft/*.h) -file(GLOB fftw_simd_support_SOURCE simd-support/*.c simd-support/*.h) -#file(GLOB fftw_threads_SOURCE threads/*.c threads/*.h) - - -set(${fftw_threads_SOURCE} - threads/api.c - threads/conf.c - threads/ct.c - threads/dft-vrank-qeq1.c - threads/f77api.c - threads/hc2hc.c - threads/openmp.c - threads/rdft-vrank-geq1.c - threads/vrank-geq1-rdft2.c) - - -include_directories( - kernel - api - dft - dft/scalar - dft/scalar/codelets # really needed? - dft/simd - dft/simd/sse2 - rdft - rdft/scalar - rdft/simd - reodft - ${CMAKE_CURRENT_SOURCE_DIR} # thats where the config.h is located - simd-support -) - -set(COMMON_SOURCES - ${fftw_api_SOURCE} - ${fftw_dft_SOURCE} - ${fftw_dft_scalar_SOURCE} - ${fftw_dft_scalar_codelets_SOURCE} - ${fftw_dft_simd_SOURCE} - ${fftw_kernel_SOURCE} - ${fftw_rdft_SOURCE} - ${fftw_rdft_scalar_SOURCE} - - ${fftw_rdft_scalar_r2cb_SOURCE} - ${fftw_rdft_scalar_r2cf_SOURCE} - ${fftw_rdft_scalar_r2r_SOURCE} - - ${fftw_rdft_simd_SOURCE} - ${fftw_reodft_SOURCE} - ${fftw_simd_support_SOURCE} - ${fftw_threads_SOURCE} -) - -set(SSE2_SOURCES - ${fftw_dft_simd_sse2_SOURCE} - ${fftw_rdft_simd_sse2_SOURCE} -) - -# Create default target for the library (double precision) -add_library(fftw3 ${COMMON_SOURCES} ${SSE2_SOURCES}) -target_compile_definitions(fftw3 PRIVATE HAVE_SSE2) -set(INSTALL_TARGETS fftw3) - -# Optionally add single precision -if(BUILD_SINGLE) - add_library(fftw3f ${COMMON_SOURCES} ${SSE2_SOURCES}) - target_compile_definitions(fftw3f PRIVATE FFTW_SINGLE BENCHFFT_SINGLE HAVE_SSE2) - set(INSTALL_TARGETS ${INSTALL_TARGETS} fftw3f) -endif(BUILD_SINGLE) - -# Optionally add long-double precision (does not support SSE2) -if(BUILD_LONG_DOUBLE) - add_library(fftw3l ${COMMON_SOURCES}) - target_compile_definitions(fftw3l PRIVATE FFTW_LDOUBLE BENCHFFT_LDOUBLE) - set(INSTALL_TARGETS ${INSTALL_TARGETS} fftw3l) -endif(BUILD_LONG_DOUBLE) - -install(TARGETS ${INSTALL_TARGETS} - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) diff --git a/ports/fftw3/config.h b/ports/fftw3/config.h deleted file mode 100644 index 900062344..000000000 --- a/ports/fftw3/config.h +++ /dev/null @@ -1,393 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to compile in long-double precision. */ -/*#undef BENCHFFT_LDOUBLE*/ - -/* Define to compile in quad precision. */ -#undef BENCHFFT_QUAD - -/* Define to compile in single precision. */ -/*#undef BENCHFFT_SINGLE*/ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define to 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to disable Fortran wrappers. */ -#define DISABLE_FORTRAN 1 - -/* Define to dummy `main' function (if any) required to link to the Fortran - libraries. */ -#undef F77_DUMMY_MAIN - -/* Define to a macro mangling the given C identifier (in lower and upper - case), which must not contain underscores, for linking with Fortran. */ -#undef F77_FUNC - -/* As F77_FUNC, but for C identifiers containing underscores. */ -#undef F77_FUNC_ - -/* Define if F77_FUNC and F77_FUNC_ are equivalent. */ -#undef F77_FUNC_EQUIV - -/* Define if F77 and FC dummy `main' functions are identical. */ -#undef FC_DUMMY_MAIN_EQ_F77 - -/* C compiler name and flags */ -#define FFTW_CC "cl" - -/* Define to enable extra FFTW debugging code. */ -#undef FFTW_DEBUG - -/* Define to enable alignment debugging hacks. */ -#undef FFTW_DEBUG_ALIGNMENT - -/* Define to enable debugging malloc. */ -#undef FFTW_DEBUG_MALLOC - -/* Define to enable the use of alloca(). */ -#undef FFTW_ENABLE_ALLOCA - -/* Define to compile in long-double precision. */ -/*#undef FFTW_LDOUBLE*/ - -/* Define to compile in quad precision. */ -#undef FFTW_QUAD - -/* Define to enable pseudorandom estimate planning for debugging. */ -#undef FFTW_RANDOM_ESTIMATOR - -/* Define to compile in single precision. */ -/*#undef FFTW_SINGLE*/ - -/* Define to 1 if you have the `abort' function. */ -#define HAVE_ABORT 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to enable Altivec optimizations. */ -#undef HAVE_ALTIVEC - -/* Define to 1 if you have the header file. */ -#undef HAVE_ALTIVEC_H - -/* Define to enable AVX optimizations. */ -#undef HAVE_AVX - -/* Define to 1 if you have the `BSDgettimeofday' function. */ -#undef HAVE_BSDGETTIMEOFDAY - -/* Define to 1 if you have the `clock_gettime' function. */ -#undef HAVE_CLOCK_GETTIME - -/* Define to 1 if you have the `cosl' function. */ -#define HAVE_COSL 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_C_ASM_H - -/* Define to 1 if you have the declaration of `cosl', and to 0 if you don't. - */ -#define HAVE_DECL_COSL 1 - -/* Define to 1 if you have the declaration of `cosq', and to 0 if you don't. */ -#define HAVE_DECL_COSQ 0 - -/* Define to 1 if you have the declaration of `drand48', and to 0 if you don't. */ -#define HAVE_DECL_DRAND48 0 - -/* Define to 1 if you have the declaration of `memalign', and to 0 if you don't. */ -#define HAVE_DECL_MEMALIGN 0 - -/* Define to 1 if you have the declaration of `posix_memalign', and to 0 if you don't. */ -#define HAVE_DECL_POSIX_MEMALIGN 0 - -/* Define to 1 if you have the declaration of `sinl', and to 0 if you don't. */ -#define HAVE_DECL_SINL 1 - -/* Define to 1 if you have the declaration of `sinq', and to 0 if you don't. - */ -#define HAVE_DECL_SINQ 0 - -/* Define to 1 if you have the declaration of `srand48', and to 0 if you - don't. */ -#define HAVE_DECL_SRAND48 0 - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define to 1 if you have the `drand48' function. */ -#undef HAVE_DRAND48 - -/* Define if you have a machine with fused multiply-add */ -#undef HAVE_FMA - -/* Define to 1 if you have the `gethrtime' function. */ -#undef HAVE_GETHRTIME - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if hrtime_t is defined in */ -#undef HAVE_HRTIME_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTRINSICS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define if the isnan() function/macro is available. */ -#undef HAVE_ISNAN - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBINTL_H - -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the `quadmath' library (-lquadmath). */ -#undef HAVE_LIBQUADMATH - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the compiler supports `long double' */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if you have the `mach_absolute_time' function. */ -#undef HAVE_MACH_ABSOLUTE_TIME - -/* Define to 1 if you have the header file. */ -#undef HAVE_MACH_MACH_TIME_H - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the `memalign' function. */ -#undef HAVE_MEMALIGN - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to enable MIPS paired-single optimizations. */ -#undef HAVE_MIPS_PS - -/* Define to enable use of MIPS ZBus cycle-counter. */ -#undef HAVE_MIPS_ZBUS_TIMER - -/* Define if you have the MPI library. */ -#undef HAVE_MPI - -/* Define if OpenMP is enabled */ -#define HAVE_OPENMP 1 - -/* Define to 1 if you have the `posix_memalign' function. */ -#undef HAVE_POSIX_MEMALIGN - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the `read_real_time' function. */ -#undef HAVE_READ_REAL_TIME - -/* Define to 1 if you have the `sinl' function. */ -#define HAVE_SINL 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `sqrt' function. */ -#define HAVE_SQRT 1 - -/* Define to enable SSE/SSE2 optimizations. */ -/* #define HAVE_SSE2 1 */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `sysctl' function. */ -#undef HAVE_SYSCTL - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `tanl' function. */ -#define HAVE_TANL 1 - -/* Define if we have a threads library. */ -#undef HAVE_THREADS - -/* Define to 1 if you have the `time_base_to_time' function. */ -#undef HAVE_TIME_BASE_TO_TIME - -/* Define to 1 if the system has the type `uintptr_t'. */ -#define HAVE_UINTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* Define to 1 if you have the `_mm_free' function. */ -#undef HAVE__MM_FREE - -/* Define to 1 if you have the `_mm_malloc' function. */ -#undef HAVE__MM_MALLOC - -/* Define if you have the UNICOS _rtc() intrinsic. */ -#undef HAVE__RTC - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Name of package */ -#define PACKAGE "fftw" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "fftw@fftw.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "fftw" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "fftw-3.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "fftw" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.fftw.org" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "3.3" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* The size of `double', as computed by sizeof. */ -#undef SIZEOF_DOUBLE - -/* The size of `fftw_r2r_kind', as computed by sizeof. */ -#undef SIZEOF_FFTW_R2R_KIND - -/* The size of `float', as computed by sizeof. */ -#undef SIZEOF_FLOAT - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* The size of `MPI_Fint', as computed by sizeof. */ -#undef SIZEOF_MPI_FINT - -/* The size of `ptrdiff_t', as computed by sizeof. */ -#undef SIZEOF_PTRDIFF_T - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of `unsigned int', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_INT - -/* The size of `unsigned long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG - -/* The size of `unsigned long long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG_LONG - -/* The size of `void *', as computed by sizeof. */ -#undef SIZEOF_VOID_P - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define if we have and are using POSIX threads. */ -#undef USING_POSIX_THREADS - -/* Version number of package */ -#define VERSION "3.3" - -/* Use common Windows Fortran mangling styles for the Fortran interfaces. */ -#undef WINDOWS_F77_MANGLING - -/* Include g77-compatible wrappers in addition to any other Fortran wrappers. - */ -#undef WITH_G77_WRAPPERS - -/* Use our own aligned malloc routine; mainly helpful for Windows systems - lacking aligned allocation system-library routines. */ -#define WITH_OUR_MALLOC 1 - -/* Use low-precision timers, making planner very slow */ -#undef WITH_SLOW_TIMER - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 86e5e722b..973cf7dbe 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -11,9 +11,6 @@ vcpkg_extract_source_archive(${ARCHIVE}) option(BUILD_SINGLE "Additionally build single precision library" ON) option(BUILD_LONG_DOUBLE "Additionally build long-double precision library" ON) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -23,8 +20,14 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/fftw3) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) vcpkg_apply_patches( SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include