d8cc16e59a8a15b4788bf1aa21643760462b436c
[platform/upstream/cmake.git] / Source / cmTryCompileCommand.h
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
5 #include "cmConfigure.h" // IWYU pragma: keep
6
7 #include <string>
8 #include <vector>
9
10 #include <cm/memory>
11
12 #include "cmCommand.h"
13 #include "cmCoreTryCompile.h"
14
15 class cmExecutionStatus;
16
17 /** \class cmTryCompileCommand
18  * \brief Specifies where to install some files
19  *
20  * cmTryCompileCommand is used to test if source code can be compiled
21  */
22 class cmTryCompileCommand : public cmCoreTryCompile
23 {
24 public:
25   /**
26    * This is a virtual constructor for the command.
27    */
28   std::unique_ptr<cmCommand> Clone() override
29   {
30     return cm::make_unique<cmTryCompileCommand>();
31   }
32
33   /**
34    * This is called when the command is first encountered in
35    * the CMakeLists.txt file.
36    */
37   bool InitialPass(std::vector<std::string> const& args,
38                    cmExecutionStatus& status) override;
39 };