2016-10-30 18:24:19 +01:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2008-10-12 18:41:06 +02:00
|
|
|
#ifndef cmTryCompileCommand_h
|
|
|
|
#define cmTryCompileCommand_h
|
|
|
|
|
2018-01-26 17:06:56 +01:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2017-07-20 19:35:53 +02:00
|
|
|
|
2017-04-14 19:02:05 +02:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2020-02-01 23:06:01 +01:00
|
|
|
#include <cm/memory>
|
|
|
|
|
|
|
|
#include "cmCommand.h"
|
2008-10-12 18:41:06 +02:00
|
|
|
#include "cmCoreTryCompile.h"
|
|
|
|
|
2017-04-14 19:02:05 +02:00
|
|
|
class cmExecutionStatus;
|
|
|
|
|
2008-10-12 18:41:06 +02:00
|
|
|
/** \class cmTryCompileCommand
|
|
|
|
* \brief Specifies where to install some files
|
|
|
|
*
|
2018-10-28 12:09:07 +01:00
|
|
|
* cmTryCompileCommand is used to test if source code can be compiled
|
2008-10-12 18:41:06 +02:00
|
|
|
*/
|
|
|
|
class cmTryCompileCommand : public cmCoreTryCompile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2020-02-01 23:06:01 +01:00
|
|
|
std::unique_ptr<cmCommand> Clone() override
|
|
|
|
{
|
|
|
|
return cm::make_unique<cmTryCompileCommand>();
|
|
|
|
}
|
2008-10-12 18:41:06 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2016-10-30 18:24:19 +01:00
|
|
|
bool InitialPass(std::vector<std::string> const& args,
|
2018-01-26 17:06:56 +01:00
|
|
|
cmExecutionStatus& status) override;
|
2008-10-12 18:41:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|