mirror of
https://github.com/reactos/CMake.git
synced 2024-12-12 13:56:00 +00:00
cmLocalGenerator: Add AppendCompileOptions overload with backtraces
This commit is contained in:
parent
a20d2c85d0
commit
5355a60fd0
@ -2422,6 +2422,30 @@ void cmLocalGenerator::AppendCompileOptions(
|
||||
}
|
||||
}
|
||||
|
||||
void cmLocalGenerator::AppendCompileOptions(
|
||||
std::vector<BT<std::string>>& options,
|
||||
const std::vector<BT<std::string>>& options_vec, const char* regex) const
|
||||
{
|
||||
if (regex != nullptr) {
|
||||
// Filter flags upon specified regular expressions.
|
||||
cmsys::RegularExpression r(regex);
|
||||
|
||||
for (BT<std::string> const& opt : options_vec) {
|
||||
if (r.find(opt.Value)) {
|
||||
std::string flag;
|
||||
this->AppendFlagEscape(flag, opt.Value);
|
||||
options.emplace_back(std::move(flag), opt.Backtrace);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (BT<std::string> const& opt : options_vec) {
|
||||
std::string flag;
|
||||
this->AppendFlagEscape(flag, opt.Value);
|
||||
options.emplace_back(std::move(flag), opt.Backtrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cmLocalGenerator::AppendIncludeDirectories(
|
||||
std::vector<std::string>& includes, const char* includes_list,
|
||||
const cmSourceFile& sourceFile) const
|
||||
|
@ -199,6 +199,9 @@ public:
|
||||
void AppendCompileOptions(std::string& options,
|
||||
const std::vector<std::string>& options_vec,
|
||||
const char* regex = nullptr) const;
|
||||
void AppendCompileOptions(std::vector<BT<std::string>>& options,
|
||||
const std::vector<BT<std::string>>& options_vec,
|
||||
const char* regex = nullptr) const;
|
||||
|
||||
/**
|
||||
* Join a set of defines into a definesString with a space separator.
|
||||
|
Loading…
Reference in New Issue
Block a user