Verified Commit 84c02369 authored by Daniel Engberg's avatar Daniel Engberg Committed by Ralph Giles
Browse files

CMake: Link libm to test binaries if available.



If libm is available link it to test binaries which will otherwise
fail to compile. Tested on FreeBSD 13-STABLE.
Signed-off-by: default avatarDaniel Engberg <daniel.engberg.lists@pyret.net>
Signed-off-by: Ralph Giles's avatarRalph Giles <giles@thaumas.net>
parent 8d28a193
Pipeline #2474 passed with stage
in 1 minute and 43 seconds
add_executable(vorbis_test util.c util.h write_read.c write_read.h test.c)
target_link_libraries(vorbis_test PRIVATE Vorbis::vorbisenc)
target_link_libraries(vorbis_test PRIVATE Vorbis::vorbisenc $<$<BOOL:${HAVE_LIBM}>:m>)
add_test(NAME vorbis_test COMMAND vorbis_test)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment