Record set of targets used in cmGeneratorExpression
This commit is contained in:
parent
ef9e9de0b8
commit
4749e4cb76
|
@ -141,6 +141,7 @@ bool cmGeneratorExpression::EvaluateTargetInfo(std::string& result)
|
||||||
result = "Target \"" + name + "\" is not an executable or library.";
|
result = "Target \"" + name + "\" is not an executable or library.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
this->Targets.insert(target);
|
||||||
|
|
||||||
// Lookup the target file with the given purpose.
|
// Lookup the target file with the given purpose.
|
||||||
std::string purpose = this->TargetInfo.match(1);
|
std::string purpose = this->TargetInfo.match(1);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include <cmsys/RegularExpression.hxx>
|
#include <cmsys/RegularExpression.hxx>
|
||||||
|
|
||||||
|
class cmTarget;
|
||||||
class cmMakefile;
|
class cmMakefile;
|
||||||
class cmListFileBacktrace;
|
class cmListFileBacktrace;
|
||||||
|
|
||||||
|
@ -38,6 +39,10 @@ public:
|
||||||
/** Evaluate generator expressions in a string. */
|
/** Evaluate generator expressions in a string. */
|
||||||
const char* Process(std::string const& input);
|
const char* Process(std::string const& input);
|
||||||
const char* Process(const char* input);
|
const char* Process(const char* input);
|
||||||
|
|
||||||
|
/** Get set of targets found during evaluations. */
|
||||||
|
std::set<cmTarget*> const& GetTargets() const
|
||||||
|
{ return this->Targets; }
|
||||||
private:
|
private:
|
||||||
cmMakefile* Makefile;
|
cmMakefile* Makefile;
|
||||||
const char* Config;
|
const char* Config;
|
||||||
|
@ -46,6 +51,7 @@ private:
|
||||||
std::vector<char> Data;
|
std::vector<char> Data;
|
||||||
std::stack<size_t> Barriers;
|
std::stack<size_t> Barriers;
|
||||||
cmsys::RegularExpression TargetInfo;
|
cmsys::RegularExpression TargetInfo;
|
||||||
|
std::set<cmTarget*> Targets;
|
||||||
bool Evaluate();
|
bool Evaluate();
|
||||||
bool Evaluate(const char* expr, std::string& result);
|
bool Evaluate(const char* expr, std::string& result);
|
||||||
bool EvaluateTargetInfo(std::string& result);
|
bool EvaluateTargetInfo(std::string& result);
|
||||||
|
|
Loading…
Reference in New Issue