Skip to content

Commit 84c0236

Browse files
diizzyyrillian
authored andcommitted
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: Daniel Engberg <[email protected]> Signed-off-by: Ralph Giles <[email protected]>
1 parent 8d28a19 commit 84c0236

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
add_executable(vorbis_test util.c util.h write_read.c write_read.h test.c)
2-
target_link_libraries(vorbis_test PRIVATE Vorbis::vorbisenc)
2+
target_link_libraries(vorbis_test PRIVATE Vorbis::vorbisenc $<$<BOOL:${HAVE_LIBM}>:m>)
33
add_test(NAME vorbis_test COMMAND vorbis_test)

0 commit comments

Comments
 (0)