cmake/Source/cmTargetPropCommandBase.h

54 lines
1.6 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>
2013-03-16 19:13:01 +02:00
#include "cmCommand.h"
class cmTarget;
class cmTargetPropCommandBase : public cmCommand
{
public:
2016-07-09 11:21:54 +02:00
enum ArgumentFlags
{
2013-03-16 19:13:01 +02:00
NO_FLAGS = 0,
2013-11-03 12:27:13 +02:00
PROCESS_BEFORE = 1,
PROCESS_SYSTEM = 2
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;
2016-07-09 11:21:54 +02:00
cmTarget* Target;
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);
2013-03-16 19:13:01 +02:00
};
#endif