mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 10:37:10 +01:00
[fftw3] Add openmp to fftw3 (#4351)
This commit is contained in:
parent
26e8a0d379
commit
1daccb57b7
@ -1,3 +1,6 @@
|
||||
Source: fftw3
|
||||
Version: 3.3.8
|
||||
Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).
|
||||
|
||||
Feature: openmp
|
||||
Description: Builds openmp enabled lib
|
17
ports/fftw3/omp_test.patch
Normal file
17
ports/fftw3/omp_test.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f3cfc20..9826bff 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -385,6 +385,12 @@ if (BUILD_TESTS)
|
||||
target_link_libraries (bench ${fftw3_lib})
|
||||
endif ()
|
||||
|
||||
+ if (ENABLE_OPENMP)
|
||||
+ target_link_libraries (bench ${fftw3_lib}_omp)
|
||||
+ else ()
|
||||
+ target_link_libraries (bench ${fftw3_lib})
|
||||
+ endif ()
|
||||
+
|
||||
|
||||
enable_testing ()
|
||||
|
@ -17,12 +17,25 @@ vcpkg_download_distfile(ARCHIVE
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/omp_test.patch
|
||||
)
|
||||
|
||||
if ("openmp" IN_LIST FEATURES)
|
||||
set(ENABLE_OPENMP ON)
|
||||
else()
|
||||
set(ENABLE_OPENMP OFF)
|
||||
endif()
|
||||
|
||||
foreach(PRECISION ENABLE_DEFAULT_PRECISION ENABLE_FLOAT ENABLE_LONG_DOUBLE)
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-D${PRECISION}=ON
|
||||
-DENABLE_OPENMP=${ENABLE_OPENMP}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
Loading…
x
Reference in New Issue
Block a user