Skip to content

alignment: guard SPK test target when erfa is not found#2380

Merged
knro merged 1 commit into
indilib:masterfrom
ckemper67:fix/spk-erfa-optional
Apr 28, 2026
Merged

alignment: guard SPK test target when erfa is not found#2380
knro merged 1 commit into
indilib:masterfrom
ckemper67:fix/spk-erfa-optional

Conversation

@ckemper67
Copy link
Copy Markdown
Contributor

libs/alignment/CMakeLists.txt already guards indi_SPK_MathPlugin behind if(ERFA_FOUND), but test/alignment/CMakeLists.txt was missing the same guard. It used REQUIRED which caused cmake to fail on systems without erfa, and unconditionally added SPKMathPlugin sources to test_alignment_plugins. This fix applies the same optional pattern to the test target.

To verify, remove erfa and reconfigure:

cmake -B build -U "*ERFA*" 2>&1 | grep -i erfa
ninja -C build -t targets all | grep -i mathplugin

SPK targets should not appear in the second command's output.

libs/alignment/CMakeLists.txt already guards indi_SPK_MathPlugin behind
if(ERFA_FOUND), but test/alignment/CMakeLists.txt was missing the same
guard. It used REQUIRED which caused cmake to fail on systems without erfa,
and unconditionally added SPKMathPlugin sources to test_alignment_plugins.
This fix applies the same optional pattern to the test target.

To verify, remove erfa and reconfigure:

    cmake -B build -U "*ERFA*" 2>&1 | grep -i erfa
    ninja -C build -t targets all | grep -i mathplugin

SPK targets should not appear in the second command's output.
@knro knro merged commit 9531df6 into indilib:master Apr 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants