Add 'check' target which both builds and tests

This commit is contained in:
Dean Moldovan
2016-06-01 23:28:44 +02:00
parent 1fe5901062
commit 52ae7b1d33
3 changed files with 8 additions and 10 deletions

View File

@@ -145,6 +145,7 @@ endfunction()
if (PYBIND11_TEST)
enable_testing()
add_subdirectory(example)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> DEPENDS example)
endif()
if (PYBIND11_INSTALL)