CMake & CTest : make test doesn’t build tests
It is arguably a bug in CMake (previously tracked here) that this doesn’t work out of the box. A workaround is to do the following: add_test(TestName ExeName) add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS ExeName) Then you can run make check and it will compile and run the test. If you have several tests, then you would have … Read more