From a36814a6f9fbb62f49897f9fb1e68d204602e199 Mon Sep 17 00:00:00 2001 From: Maxime Hadjinlian Date: Tue, 2 Feb 2016 17:28:31 +0100 Subject: [PATCH] cmake: uClibc: Fix missing libm for tests At the link time, the tests are not linked against libm which cause an error with uClibc based toolchain: ../../yajl-2.1.0/lib/libyajl.so.2.1.0: undefined reference to `__isnan' ../../yajl-2.1.0/lib/libyajl.so.2.1.0: undefined reference to `__isinf' Signed-off-by: Maxime Hadjinlian --- test/api/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt index cd65a54..e0ce2f6 100644 --- a/test/api/CMakeLists.txt +++ b/test/api/CMakeLists.txt @@ -21,5 +21,5 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib) FOREACH (test ${TESTS}) GET_FILENAME_COMPONENT(testProg ${test} NAME_WE) ADD_EXECUTABLE(${testProg} ${test}) - TARGET_LINK_LIBRARIES(${testProg} yajl) + TARGET_LINK_LIBRARIES(${testProg} yajl m) ENDFOREACH() -- 2.7.0