Fixed tests not built with the right preprocessos options

This commit is contained in:
cschreib
2017-06-14 16:33:31 +02:00
parent c95c36b83c
commit da52ce22b4

View File

@@ -22,32 +22,32 @@ add_library(tinyexpr STATIC ${SOURCE_FILES})
target_link_libraries(tinyexpr ${MATH_LIB}) target_link_libraries(tinyexpr ${MATH_LIB})
if (build_tinyexpr_test) if (build_tinyexpr_test)
add_executable(tinyexpr_test test.c) add_executable(tinyexpr_test test.c tinyexpr.c)
target_link_libraries(tinyexpr_test tinyexpr) target_link_libraries(tinyexpr_test ${MATH_LIB})
endif() endif()
if (build_tinyexpr_test_pr) if (build_tinyexpr_test_pr)
add_definitions(-DTE_POW_FROM_RIGHT -DTE_NAT_LOG) add_executable(tinyexpr_test_pr test.c tinyexpr.c)
add_executable(tinyexpr_test_pr test.c) target_compile_definitions(tinyexpr_test_pr PRIVATE TE_POW_FROM_RIGHT TE_NAT_LOG)
target_link_libraries(tinyexpr_test_pr tinyexpr) target_link_libraries(tinyexpr_test_pr ${MATH_LIB})
endif() endif()
if (build_tinyexpr_bench) if (build_tinyexpr_bench)
add_executable(tinyexpr_benchmark benchmark.c) add_executable(tinyexpr_benchmark benchmark.c tinyexpr.c)
target_link_libraries(tinyexpr_benchmark tinyexpr) target_link_libraries(tinyexpr_benchmark ${MATH_LIB})
endif() endif()
if (build_tinyexpr_example) if (build_tinyexpr_example)
add_executable(tinyexpr_example example.c) add_executable(tinyexpr_example example.c tinyexpr.c)
target_link_libraries(tinyexpr_example tinyexpr) target_link_libraries(tinyexpr_example ${MATH_LIB})
endif() endif()
if (build_tinyexpr_example2) if (build_tinyexpr_example2)
add_executable(tinyexpr_example2 example2.c) add_executable(tinyexpr_example2 example2.c tinyexpr.c)
target_link_libraries(tinyexpr_example2 tinyexpr) target_link_libraries(tinyexpr_example2 ${MATH_LIB})
endif() endif()
if (build_tinyexpr_example3) if (build_tinyexpr_example3)
add_executable(tinyexpr_example3 example3.c) add_executable(tinyexpr_example3 example3.c tinyexpr.c)
target_link_libraries(tinyexpr_example3 tinyexpr) target_link_libraries(tinyexpr_example3 ${MATH_LIB})
endif() endif()