CMakeLists.txt: do not fallback to old cunit version

parent ff67d518
......@@ -94,7 +94,7 @@ if(POLARSSL_FOUND)
endif()
if(ENABLE_TESTS_COMPONENT)
find_package(CUnit)
find_package(CUnit 3.0.1) # we need cunit 3.0-1 for automated junit output
if(CUNIT_FOUND)
cmake_push_check_state(RESET)
list(APPEND CMAKE_REQUIRED_INCLUDES ${CUNIT_INCLUDE_DIRS})
......@@ -103,10 +103,12 @@ if(ENABLE_TESTS_COMPONENT)
check_symbol_exists("CU_curses_run_tests" "CUnit/CUnit.h" HAVE_CU_CURSES)
check_symbol_exists("CU_set_trace_handler" "CUnit/Util.h" HAVE_CU_SET_TRACE_HANDLER)
cmake_pop_check_state()
set(TESTER_REQUIRES_PRIVATE "cunit")
else()
message(WARNING "Could not find the Cunit library, disable tests.")
set(ENABLE_TESTS_COMPONENT OFF CACHE BOOL "Enable compilation of tests helper library" FORCE)
# if we found did not found Cunit or improper version, just lamentably fail
# there are too much issue with using an old version...
message(FATAL_WARNING "Could not find the Cunit library with proper version. Consider turning tests component OFF with -DENABLE_TESTS_COMPONENT=OFF")
endif()
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment