1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
10 #include "cmArgumentParser.h"
11 #include "cmCTestCommand.h"
13 class cmCTestGenericHandler;
14 class cmExecutionStatus;
16 /** \class cmCTestHandler
17 * \brief Run a ctest script
19 * cmCTestHandlerCommand defineds the command to test the project.
21 class cmCTestHandlerCommand
22 : public cmCTestCommand
23 , public cmArgumentParser<void>
27 * The name of the command as specified in CMakeList.txt.
29 virtual std::string GetName() const = 0;
32 * This is called when the command is first encountered in
33 * the CMakeLists.txt file.
35 bool InitialPass(std::vector<std::string> const& args,
36 cmExecutionStatus& status) override;
39 virtual cmCTestGenericHandler* InitializeHandler() = 0;
41 virtual void ProcessAdditionalValues(cmCTestGenericHandler* handler);
43 // Command argument handling.
44 virtual void BindArguments();
45 virtual void CheckArguments(std::vector<std::string> const& keywords);
49 std::string CaptureCMakeError;
50 std::string ReturnValue;
53 std::string SubmitIndex;
56 #define CTEST_COMMAND_APPEND_OPTION_DOCS \
57 "The APPEND option marks results for append to those previously " \
58 "submitted to a dashboard server since the last ctest_start. " \
59 "Append semantics are defined by the dashboard server in use."