"It is considered best practice to use lowercase CMake commands." [0]
"Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style." [1]
include(CTest) is the preferred way to add testing to cmake projects. It provides a new variable BUILD_TESTING (default ON) to select whether to build the tests or not.
Hello!
include(CTest)
is the preferred way to add testing to cmake projects. It provides a new variableBUILD_TESTING
(defaultON
) to select whether to build the tests or not.[0] https://cmake.org/cmake/help/book/mastering-cmake/chapter/Writing%20CMakeLists%20Files.html#commands [1] https://gitlab.kitware.com/cmake/cmake/-/commit/9db31162 [2] https://cmake.org/cmake/help/book/mastering-cmake/chapter/Testing%20With%20CMake%20and%20CTest.html#how-does-cmake-facilitate-testing