Skip to content

Commit

Permalink
CMake: Link libm to test binaries if available.
Browse files Browse the repository at this point in the history
If libm is available link it to test binaries which will otherwise
fail to compile. Tested on FreeBSD 13-STABLE.

Signed-off-by: Daniel Engberg <[email protected]>
Signed-off-by: Ralph Giles <[email protected]>
  • Loading branch information
diizzyy authored and rillian committed May 12, 2021
1 parent 8d28a19 commit 84c0236
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
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)

0 comments on commit 84c0236

Please sign in to comment.