2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2008-02-29 23:28:46 +03:00
|
|
|
#ifndef cmCMakePolicyCommand_h
|
|
|
|
#define cmCMakePolicyCommand_h
|
|
|
|
|
|
|
|
#include "cmCommand.h"
|
|
|
|
|
|
|
|
/** \class cmCMakePolicyCommand
|
|
|
|
* \brief Set how CMake should handle policies
|
|
|
|
*
|
2012-08-13 21:42:58 +04:00
|
|
|
* cmCMakePolicyCommand sets how CMake should deal with backwards
|
|
|
|
* compatibility policies.
|
2008-02-29 23:28:46 +03:00
|
|
|
*/
|
|
|
|
class cmCMakePolicyCommand : public cmCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
cmCommand* Clone() CM_OVERRIDE { return new cmCMakePolicyCommand; }
|
2008-02-29 23:28:46 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
bool InitialPass(std::vector<std::string> const& args,
|
|
|
|
cmExecutionStatus& status) CM_OVERRIDE;
|
2008-02-29 23:28:46 +03:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
/**
|
|
|
|
* This determines if the command is invoked when in script mode.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
bool IsScriptable() const CM_OVERRIDE { return true; }
|
2008-02-29 23:28:46 +03:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
/**
|
|
|
|
* The name of the command as specified in CMakeList.txt.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
std::string GetName() const CM_OVERRIDE { return "cmake_policy"; }
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-02-29 23:28:46 +03:00
|
|
|
cmTypeMacro(cmCMakePolicyCommand, cmCommand);
|
2016-05-16 17:34:04 +03:00
|
|
|
|
2008-03-06 02:21:10 +03:00
|
|
|
private:
|
|
|
|
bool HandleSetMode(std::vector<std::string> const& args);
|
2008-08-18 17:53:06 +04:00
|
|
|
bool HandleGetMode(std::vector<std::string> const& args);
|
2008-03-06 02:21:10 +03:00
|
|
|
bool HandleVersionMode(std::vector<std::string> const& args);
|
2008-02-29 23:28:46 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|