CTest ?

In https://cliutils.gitlab.io/modern-cmake/chapters/testing.html

Why don't using include(CTest) instead of the "poor" enable_testing() directly ?

src: https://cmake.org/cmake/help/latest/manual/ctest.1.html

Also you can test BUILD_TESTING to know if test must be enable or not which is the standard way IMHO...

Note CMake will generate tests only if the enable_testing() command has been invoked. The CTest module invokes the command automatically when the BUILD_TESTING option is ON.

src: https://cmake.org/cmake/help/latest/command/add_test.html

Edited Dec 06, 2018 by Mizux Seiha
Assignee Loading
Time tracking Loading