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. */
|
2021-09-14 00:13:48 +02:00
|
|
|
#pragma once
|
2013-03-16 19:13:01 +02:00
|
|
|
|
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,
|
2021-09-14 00:13:48 +02:00
|
|
|
PROCESS_AFTER = 0x2,
|
2023-05-23 16:38:00 +02:00
|
|
|
PROCESS_SYSTEM = 0x4,
|
|
|
|
PROCESS_REUSE_FROM = 0x8
|
2013-03-16 19:13:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
bool HandleArguments(std::vector<std::string> const& args,
|
2023-05-23 16:38:00 +02:00
|
|
|
const std::string& prop, unsigned int 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);
|
2022-03-29 21:10:50 +02:00
|
|
|
virtual bool PopulateTargetProperties(
|
|
|
|
const std::string& scope, 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);
|
2020-02-01 23:06:01 +01:00
|
|
|
|
|
|
|
cmExecutionStatus& Status;
|
2013-03-16 19:13:01 +02:00
|
|
|
};
|