Spec-Zone.ru › CMake

BUILD_TESTING

Control whether the CTest module invokes enable_testing().

The CTest module, when loaded by include(CTest), runs code of the form:

option(BUILD_TESTING "..." ON)
if (BUILD_TESTING)
   # ...
   enable_testing()
   # ...
endif()

This creates a BUILD_TESTING option that controls whether the enable_testing() command is invoked to enable generation of tests to run using ctest(1). See the add_test() command to create tests.

Note

Call include(CTest) in the top-level source directory since ctest(1) expects to find a test file in the top-level build directory.

© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/variable/BUILD_TESTING.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API