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-01-17 23:54:49 +03:00
|
|
|
#ifndef cmSetsPropertiesCommand_h
|
|
|
|
#define cmSetsPropertiesCommand_h
|
|
|
|
|
|
|
|
#include "cmCommand.h"
|
|
|
|
|
|
|
|
class cmSetPropertyCommand : public cmCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmSetPropertyCommand();
|
|
|
|
|
2016-06-27 22:25:27 +03:00
|
|
|
cmCommand* Clone() CM_OVERRIDE { return new cmSetPropertyCommand; }
|
2008-01-17 23:54:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the input file.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
bool InitialPass(std::vector<std::string> const& args,
|
|
|
|
cmExecutionStatus& status) CM_OVERRIDE;
|
2008-01-17 23:54:49 +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 "set_property"; }
|
2008-01-17 23:54:49 +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-01-17 23:54:49 +03:00
|
|
|
|
|
|
|
cmTypeMacro(cmSetPropertyCommand, cmCommand);
|
|
|
|
|
|
|
|
private:
|
2014-02-10 09:21:34 +04:00
|
|
|
std::set<std::string> Names;
|
2008-01-17 23:54:49 +03:00
|
|
|
std::string PropertyName;
|
|
|
|
std::string PropertyValue;
|
2008-04-01 22:22:09 +04:00
|
|
|
bool Remove;
|
2008-01-17 23:54:49 +03:00
|
|
|
bool AppendMode;
|
2011-07-14 01:14:41 +04:00
|
|
|
bool AppendAsString;
|
2008-01-17 23:54:49 +03:00
|
|
|
|
|
|
|
// Implementation of each property type.
|
|
|
|
bool HandleGlobalMode();
|
|
|
|
bool HandleDirectoryMode();
|
|
|
|
bool HandleTargetMode();
|
|
|
|
bool HandleTarget(cmTarget* target);
|
|
|
|
bool HandleSourceMode();
|
|
|
|
bool HandleSource(cmSourceFile* sf);
|
|
|
|
bool HandleTestMode();
|
|
|
|
bool HandleTest(cmTest* test);
|
2009-03-10 18:10:59 +03:00
|
|
|
bool HandleCacheMode();
|
2015-04-05 11:48:04 +03:00
|
|
|
bool HandleCacheEntry(std::string const&);
|
2014-05-15 21:12:40 +04:00
|
|
|
bool HandleInstallMode();
|
|
|
|
bool HandleInstall(cmInstalledFile* file);
|
2008-01-17 23:54:49 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|