cmEnableTestingCommand.h 1.1 KB

1234567891011121314151617181920212223242526
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include <vector>
  7. class cmExecutionStatus;
  8. /**
  9. * \brief Enable testing for this directory and below.
  10. *
  11. * Produce the output testfile. This produces a file in the build directory
  12. * called CMakeTestfile with a syntax similar to CMakeLists.txt. It contains
  13. * the subdirs() and add_test() commands from the source CMakeLists.txt
  14. * file with CMake variables expanded. Only the subdirs and tests
  15. * within the valid control structures are replicated in Testfile
  16. * (i.e. subdirs() and add_test() commands within IF() commands that are
  17. * not entered by CMake are not replicated in Testfile).
  18. * Note that CTest expects to find this file in the build directory root;
  19. * therefore, this command should be in the source directory root too.
  20. */
  21. bool cmEnableTestingCommand(std::vector<std::string> const&,
  22. cmExecutionStatus&);