Skip to content

Commit dc892ad

Browse files
committed
Migrate to FFTW from FFTS inside unit tests
1 parent e271961 commit dc892ad

File tree

14 files changed

+52
-207
lines changed

14 files changed

+52
-207
lines changed

.github/workflows/CodeQL.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jobs:
5959
catch2 \
6060
mesa-vulkan-drivers \
6161
libhidapi-dev \
62-
ccache
62+
ccache \
63+
libfftw3-dev
6364
6465
- name: Load Vulkan SDK Repo (Ubuntu 22.04)
6566
run: |
@@ -68,30 +69,6 @@ jobs:
6869
sudo apt update
6970
sudo apt install vulkan-sdk
7071
71-
- name: Cache FFTS
72-
uses: actions/cache@v4
73-
with:
74-
path: ~/ffts
75-
key: ${{ runner.os }}-ubuntu-22.04-ffts
76-
77-
- name: Clone and Build FFTS Library
78-
run: |
79-
if [[ ! -d ~/ffts ]]; then
80-
cd
81-
git clone https://github.com/anthonix/ffts.git
82-
cd ffts
83-
mkdir build
84-
cd build
85-
cmake \
86-
-DENABLE_SHARED=ON \
87-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
88-
-GNinja \
89-
..
90-
ninja
91-
fi
92-
cd ~/ffts/build
93-
sudo ninja install
94-
9572
# Initializes the CodeQL tools for scanning.
9673
- name: Initialize CodeQL
9774
uses: github/codeql-action/init@v3

.github/workflows/build-arch.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
ninja \
5757
vulkan-swrast \
5858
lsb-release
59+
fftw
5960
6061
- name: Install Docs Dependencies
6162
if: ${{ matrix.docs }}
@@ -110,33 +111,6 @@ jobs:
110111
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
111112
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
112113
113-
- name: Cache FFTS
114-
uses: actions/cache@v4
115-
with:
116-
path: ~/ffts
117-
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts
118-
119-
- name: Clone and Build FFTS Library
120-
run: |
121-
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
122-
if [[ ! -d ~/ffts ]]; then
123-
export CC=/usr/bin/gcc-14
124-
export CXX=/usr/bin/g++-14
125-
cd
126-
git clone https://github.com/anthonix/ffts.git
127-
cd ffts
128-
mkdir build
129-
cd build
130-
cmake \
131-
-DENABLE_SHARED=ON \
132-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
133-
-GNinja \
134-
..
135-
ninja
136-
fi
137-
cd ~/ffts/build
138-
ninja install
139-
140114
- name: Configure
141115
run: |
142116
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh

.github/workflows/build-debian.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ jobs:
6767
glslang-tools \
6868
spirv-tools \
6969
glslc \
70-
lsb-release
70+
lsb-release \
71+
libfftw3-dev
7172
7273
- name: Install Docs Dependencies
7374
if: ${{ matrix.docs }}
@@ -113,31 +114,6 @@ jobs:
113114
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
114115
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
115116
116-
- name: Cache FFTS
117-
uses: actions/cache@v4
118-
with:
119-
path: ~/ffts
120-
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts
121-
122-
- name: Clone and Build FFTS Library
123-
run: |
124-
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
125-
if [[ ! -d ~/ffts ]]; then
126-
cd
127-
git clone https://github.com/anthonix/ffts.git
128-
cd ffts
129-
mkdir build
130-
cd build
131-
cmake \
132-
-DENABLE_SHARED=ON \
133-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
134-
-GNinja \
135-
..
136-
ninja
137-
fi
138-
cd ~/ffts/build
139-
ninja install
140-
141117
- name: Configure
142118
run: |
143119
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh

.github/workflows/build-fedora.yml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
fedora-packager \
5555
rpmdevtools \
5656
mesa-vulkan-drivers \
57+
fftw3-devel \
5758
lsb-release
5859
5960
- name: Install Docs Dependencies
@@ -111,31 +112,6 @@ jobs:
111112
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
112113
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
113114
114-
- name: Cache FFTS
115-
uses: actions/cache@v4
116-
with:
117-
path: ~/ffts
118-
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts
119-
120-
- name: Clone and Build FFTS Library
121-
run: |
122-
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
123-
if [[ ! -d ~/ffts ]]; then
124-
cd
125-
git clone https://github.com/anthonix/ffts.git
126-
cd ffts
127-
mkdir build
128-
cd build
129-
cmake \
130-
-DENABLE_SHARED=ON \
131-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
132-
-GNinja \
133-
..
134-
ninja
135-
fi
136-
cd ~/ffts/build
137-
sudo ninja install
138-
139115
- name: Configure
140116
run: |
141117
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh

.github/workflows/build-macos-arm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ jobs:
4343
shaderc \
4444
molten-vk \
4545
ninja \
46-
hidapi
46+
hidapi \
47+
fftw
4748
4849
- name: Configure
4950
run: |

.github/workflows/build-macos-intel.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,8 @@ jobs:
4343
shaderc \
4444
molten-vk \
4545
ninja \
46-
hidapi
47-
48-
- name: Cache FFTS
49-
uses: actions/cache@v4
50-
with:
51-
path: ~/ffts-prefix
52-
key: ${{ runner.os }}-ffts-prefix
53-
54-
55-
- name: Clone and Build FFTS Library
56-
run: |
57-
[[ -d ~/ffts-prefix ]] && exit 0
58-
cd
59-
git clone https://github.com/anthonix/ffts.git
60-
cd ffts
61-
mkdir build
62-
cd build
63-
cmake \
64-
-DENABLE_SHARED=ON \
65-
-DCMAKE_INSTALL_PREFIX=$HOME/ffts-prefix \
66-
-DCMAKE_INSTALL_RPATH=$HOME/ffts-prefix/lib \
67-
-DCMAKE_MACOSX_RPATH=ON \
68-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
69-
-GNinja \
70-
..
71-
ninja
72-
sudo ninja install
46+
hidapi \
47+
fftw
7348
7449
- name: Configure
7550
run: |
@@ -83,7 +58,7 @@ jobs:
8358
-DCMAKE_BUILD_TYPE=Release \
8459
-DBUILD_DOCS=OFF \
8560
-DBUILD_TESTING=ON \
86-
-DCMAKE_PREFIX_PATH="$(brew --prefix)/opt/libomp;$HOME/ffts-prefix" \
61+
-DCMAKE_PREFIX_PATH="$(brew --prefix)/opt/libomp" \
8762
..
8863
8964
- name: Build

.github/workflows/build-ubuntu.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ jobs:
5858
wget \
5959
xzip \
6060
libhidapi-dev \
61-
ccache
61+
ccache \
62+
libfftw3-dev
6263
6364
- name: Install Docs Dependencies
6465
if: ${{ matrix.docs }}
@@ -107,31 +108,6 @@ jobs:
107108
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
108109
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
109110
110-
- name: Cache FFTS
111-
uses: actions/cache@v4
112-
with:
113-
path: ~/ffts
114-
key: ${{ runner.os }}-${{ matrix.os }}-ffts
115-
116-
- name: Clone and Build FFTS Library
117-
run: |
118-
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
119-
if [[ ! -d ~/ffts ]]; then
120-
cd
121-
git clone https://github.com/anthonix/ffts.git
122-
cd ffts
123-
mkdir build
124-
cd build
125-
cmake \
126-
-DENABLE_SHARED=ON \
127-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
128-
-GNinja \
129-
..
130-
ninja
131-
fi
132-
cd ~/ffts/build
133-
sudo ninja install
134-
135111
- name: Configure
136112
run: |
137113
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh

.github/workflows/build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
shaderc:p
4949
glslang:p
5050
spirv-tools:p
51-
ffts:p
51+
fftw:p
5252
hidapi:p
5353
libpng:p
5454

CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ if(WIN32)
130130
add_compile_options(-D_USE_MATH_DEFINES -D_POSIX_THREAD_SAFE_FUNCTIONS)
131131
endif()
132132

133-
# Detect Apple Silicon as FFTS is not available for it
134-
if(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
135-
add_compile_options(-D_APPLE_SILICON)
136-
set(APPLE_SILICON TRUE)
137-
endif()
138-
139133
# Package detection
140134
find_package(PkgConfig MODULE REQUIRED)
141135

@@ -282,13 +276,6 @@ add_subdirectory(devdoc)
282276

283277
# Unit tests
284278
if(Git_FOUND AND BUILD_TESTING)
285-
# find ffts, except on Apple Silicon where it's not supported
286-
if(NOT APPLE_SILICON)
287-
# ffts ships a broken pkgconfig file on some platforms so we are not going to use it
288-
find_path(LIBFFTS_INCLUDE_DIRS ffts.h PATH_SUFFIXES ffts REQUIRED)
289-
find_library(LIBFFTS_LIBRARIES NAMES ffts libffts REQUIRED)
290-
endif()
291-
292279
find_package(Catch2 REQUIRED)
293280
include(Catch)
294281
#Catch2 v3.x.y have a breaking change:

msys2/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ depends=(
1414
"${MINGW_PACKAGE_PREFIX}-libsigc++"
1515
"${MINGW_PACKAGE_PREFIX}-cairomm"
1616
"${MINGW_PACKAGE_PREFIX}-yaml-cpp"
17-
"${MINGW_PACKAGE_PREFIX}-ffts"
17+
"${MINGW_PACKAGE_PREFIX}-fftw"
1818
"${MINGW_PACKAGE_PREFIX}-vulkan-loader"
1919
"${MINGW_PACKAGE_PREFIX}-glfw"
2020
)

0 commit comments

Comments
 (0)