Skip to content

Commit

Permalink
tests: A new target check to build+run targets
Browse files Browse the repository at this point in the history
The CMake test target does not build tests it just runs them - the
rationale for this is that CTest is used to run tests, and the ALL
target to build them.

Added a new target **check** to build and run the tests.
  • Loading branch information
equalsraf committed May 7, 2015
1 parent 0efacfb commit 40119aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

include_directories(${CMAKE_SOURCE_DIR}/src)

add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
function(add_xtest SOURCE_NAME)
add_executable(${SOURCE_NAME} ${SOURCE_NAME}.cpp)
target_link_libraries(${SOURCE_NAME} Qt5::Network Qt5::Test ${MSGPACK_LIBRARIES} neovim-qt)
add_test(NAME ${SOURCE_NAME} COMMAND ${SOURCE_NAME})
add_dependencies(check ${SOURCE_NAME})
endfunction()

add_xtest(tst_neovimobject)
Expand Down

0 comments on commit 40119aa

Please sign in to comment.