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
11 #include "cmScriptGenerator.h"
13 class cmGeneratorExpression
;
14 class cmLocalGenerator
;
17 /** \class cmTestGenerator
18 * \brief Support class for generating install scripts.
21 class cmTestGenerator
: public cmScriptGenerator
24 cmTestGenerator(cmTest
* test
,
25 std::vector
<std::string
> const& configurations
=
26 std::vector
<std::string
>());
27 ~cmTestGenerator() override
;
29 cmTestGenerator(cmTestGenerator
const&) = delete;
30 cmTestGenerator
& operator=(cmTestGenerator
const&) = delete;
32 void Compute(cmLocalGenerator
* lg
);
34 /** Test if this generator installs the test for a given configuration. */
35 bool TestsForConfig(const std::string
& config
);
37 cmTest
* GetTest() const;
40 void GenerateInternalProperties(std::ostream
& os
);
41 std::vector
<std::string
> EvaluateCommandLineArguments(
42 const std::vector
<std::string
>& argv
, cmGeneratorExpression
& ge
,
43 const std::string
& config
) const;
46 void GenerateScriptConfigs(std::ostream
& os
, Indent indent
) override
;
47 void GenerateScriptActions(std::ostream
& os
, Indent indent
) override
;
48 void GenerateScriptForConfig(std::ostream
& os
, const std::string
& config
,
49 Indent indent
) override
;
50 void GenerateScriptNoConfig(std::ostream
& os
, Indent indent
) override
;
51 bool NeedsScriptNoConfig() const override
;
52 void GenerateOldStyle(std::ostream
& os
, Indent indent
);