mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 15:20:56 -06:00
cmLocalGenerator: Add GetTargetCompileFlags overload with backtraces
This commit is contained in:
@@ -1382,6 +1382,16 @@ void cmLocalGenerator::GetTargetCompileFlags(cmGeneratorTarget* target,
|
||||
std::string const& lang,
|
||||
std::string& flags)
|
||||
{
|
||||
std::vector<BT<std::string>> tmpFlags =
|
||||
this->GetTargetCompileFlags(target, config, lang);
|
||||
this->AppendFlags(flags, tmpFlags);
|
||||
}
|
||||
|
||||
std::vector<BT<std::string>> cmLocalGenerator::GetTargetCompileFlags(
|
||||
cmGeneratorTarget* target, std::string const& config,
|
||||
std::string const& lang)
|
||||
{
|
||||
std::vector<BT<std::string>> flags;
|
||||
std::string compileFlags;
|
||||
|
||||
cmMakefile* mf = this->GetMakefile();
|
||||
@@ -1406,9 +1416,11 @@ void cmLocalGenerator::GetTargetCompileFlags(cmGeneratorTarget* target,
|
||||
this->AppendFlags(compileFlags,
|
||||
this->GetFrameworkFlags(lang, config, target));
|
||||
|
||||
flags = std::move(compileFlags);
|
||||
|
||||
if (!compileFlags.empty()) {
|
||||
flags.emplace_back(std::move(compileFlags));
|
||||
}
|
||||
this->AddCompileOptions(flags, target, lang, config);
|
||||
return flags;
|
||||
}
|
||||
|
||||
static std::string GetFrameworkFlags(const std::string& lang,
|
||||
|
||||
@@ -397,6 +397,9 @@ public:
|
||||
void GetTargetCompileFlags(cmGeneratorTarget* target,
|
||||
std::string const& config,
|
||||
std::string const& lang, std::string& flags);
|
||||
std::vector<BT<std::string>> GetTargetCompileFlags(cmGeneratorTarget* target,
|
||||
std::string const& config,
|
||||
std::string const& lang);
|
||||
|
||||
std::string GetFrameworkFlags(std::string const& l,
|
||||
std::string const& config,
|
||||
|
||||
Reference in New Issue
Block a user