Skip to content

Commit 2300612

Browse files
committed
Fix warnings when options are not prefixed with the project name
1 parent 25f015b commit 2300612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/project_parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ Project::Project(const Project *parent, const std::string &path, bool build) : p
452452
if (ncondition.find(nproject_prefix) == 0) {
453453
ncondition = ncondition.substr(nproject_prefix.size());
454454
}
455-
if (!ncondition.empty()) {
455+
if (!ncondition.empty() && ncondition != o.name) {
456456
if (conditions.contains(ncondition)) {
457457
print_key_warning("Option '" + o.name + "' would create a condition '" + ncondition + "' that already exists", o.name, value);
458458
}

0 commit comments

Comments
 (0)