0

As per this document,which says that:

enable_testing()

This command is automatically invoked when the CTest module is included, except if the BUILD_TESTING option is turned off.

And this post also clearly states the same meaning, which says that:

When you call add_test(...), CMake will not generate the tests unless enable_testing() has been called. Note that you usually don't need to call this directly. Just include(CTest) and it will invoke it for you.

Then a question arises. Since include(CTest) internally invokes enable_testing(), does it mean that it's no meaning to manually invoke enable_testing()?

John
  • 2,963
  • 11
  • 33

0 Answers0