mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
CMake: Add target "check" that builds and runs tests
This commit is contained in:
@ -29,6 +29,11 @@ if(ENABLE_CJSON_TEST)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#"check" target that automatically builds everything and runs the tests
|
||||||
|
add_custom_target(check
|
||||||
|
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
|
||||||
|
DEPENDS ${unity_tests})
|
||||||
|
|
||||||
foreach(unity_test ${unity_tests})
|
foreach(unity_test ${unity_tests})
|
||||||
add_executable("${unity_test}" "${unity_test}.c")
|
add_executable("${unity_test}" "${unity_test}.c")
|
||||||
target_link_libraries("${unity_test}" "${CJSON_LIB}" unity test-common)
|
target_link_libraries("${unity_test}" "${CJSON_LIB}" unity test-common)
|
||||||
|
Reference in New Issue
Block a user