cmake/Source/cmTargetPropCommandBase.h

63 lines
1.8 KiB
C
Raw Normal View History

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. */
2013-03-16 19:13:01 +02:00
#ifndef cmTargetPropCommandBase_h
#define cmTargetPropCommandBase_h
2017-07-20 19:35:53 +02:00
#include "cmConfigure.h" // IWYU pragma: keep
2017-04-14 19:02:05 +02:00
#include <string>
#include <vector>
2020-02-01 23:06:01 +01:00
class cmExecutionStatus;
class cmMakefile;
2013-03-16 19:13:01 +02:00
class cmTarget;
2020-02-01 23:06:01 +01:00
class cmTargetPropCommandBase
2013-03-16 19:13:01 +02:00
{
public:
2020-02-01 23:06:01 +01:00
cmTargetPropCommandBase(cmExecutionStatus& status);
virtual ~cmTargetPropCommandBase() = default;
void SetError(std::string const& e);
2016-07-09 11:21:54 +02:00
enum ArgumentFlags
{
2020-02-01 23:06:01 +01:00
NO_FLAGS = 0x0,
PROCESS_BEFORE = 0x1,
PROCESS_SYSTEM = 0x2,
PROCESS_REUSE_FROM = 0x3
2013-03-16 19:13:01 +02:00
};
bool HandleArguments(std::vector<std::string> const& args,
2015-04-27 22:25:09 +02:00
const std::string& prop,
ArgumentFlags flags = NO_FLAGS);
2013-03-16 19:13:01 +02:00
protected:
std::string Property;
2018-08-09 18:06:22 +02:00
cmTarget* Target = nullptr;
2020-02-01 23:06:01 +01:00
cmMakefile* Makefile;
2016-07-09 11:21:54 +02:00
virtual void HandleInterfaceContent(cmTarget* tgt,
const std::vector<std::string>& content,
bool prepend, bool system);
2013-03-16 19:13:01 +02:00
private:
2016-07-09 11:21:54 +02:00
virtual void HandleMissingTarget(const std::string& name) = 0;
2013-03-16 19:13:01 +02:00
2016-07-09 11:21:54 +02:00
virtual bool HandleDirectContent(cmTarget* tgt,
const std::vector<std::string>& content,
2013-11-03 12:27:13 +02:00
bool prepend, bool system) = 0;
2016-07-09 11:21:54 +02:00
virtual std::string Join(const std::vector<std::string>& content) = 0;
2013-03-16 19:13:01 +02:00
bool ProcessContentArgs(std::vector<std::string> const& args,
2016-07-09 11:21:54 +02:00
unsigned int& argIndex, bool prepend, bool system);
bool PopulateTargetProperies(const std::string& scope,
const std::vector<std::string>& content,
2013-11-03 12:27:13 +02:00
bool prepend, bool system);
2020-02-01 23:06:01 +01:00
cmExecutionStatus& Status;
2013-03-16 19:13:01 +02:00
};
#endif