From da52ce22b4b265752f37f6e95d85908a90327187 Mon Sep 17 00:00:00 2001 From: cschreib Date: Wed, 14 Jun 2017 16:33:31 +0200 Subject: [PATCH] Fixed tests not built with the right preprocessos options --- CMakeLists.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47cbbd4..dc651a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,32 +22,32 @@ add_library(tinyexpr STATIC ${SOURCE_FILES}) target_link_libraries(tinyexpr ${MATH_LIB}) if (build_tinyexpr_test) - add_executable(tinyexpr_test test.c) - target_link_libraries(tinyexpr_test tinyexpr) + add_executable(tinyexpr_test test.c tinyexpr.c) + target_link_libraries(tinyexpr_test ${MATH_LIB}) endif() if (build_tinyexpr_test_pr) - add_definitions(-DTE_POW_FROM_RIGHT -DTE_NAT_LOG) - add_executable(tinyexpr_test_pr test.c) - target_link_libraries(tinyexpr_test_pr tinyexpr) + add_executable(tinyexpr_test_pr test.c tinyexpr.c) + target_compile_definitions(tinyexpr_test_pr PRIVATE TE_POW_FROM_RIGHT TE_NAT_LOG) + target_link_libraries(tinyexpr_test_pr ${MATH_LIB}) endif() if (build_tinyexpr_bench) - add_executable(tinyexpr_benchmark benchmark.c) - target_link_libraries(tinyexpr_benchmark tinyexpr) + add_executable(tinyexpr_benchmark benchmark.c tinyexpr.c) + target_link_libraries(tinyexpr_benchmark ${MATH_LIB}) endif() if (build_tinyexpr_example) - add_executable(tinyexpr_example example.c) - target_link_libraries(tinyexpr_example tinyexpr) + add_executable(tinyexpr_example example.c tinyexpr.c) + target_link_libraries(tinyexpr_example ${MATH_LIB}) endif() if (build_tinyexpr_example2) - add_executable(tinyexpr_example2 example2.c) - target_link_libraries(tinyexpr_example2 tinyexpr) + add_executable(tinyexpr_example2 example2.c tinyexpr.c) + target_link_libraries(tinyexpr_example2 ${MATH_LIB}) endif() if (build_tinyexpr_example3) - add_executable(tinyexpr_example3 example3.c) - target_link_libraries(tinyexpr_example3 tinyexpr) + add_executable(tinyexpr_example3 example3.c tinyexpr.c) + target_link_libraries(tinyexpr_example3 ${MATH_LIB}) endif()