Skip to content

Commit eaa3616

Browse files
authored
Merge pull request #196 from ZehMatt/fix-option-prefix
Fix warnings when options are not prefixed with the project name
2 parents 25f015b + 2300612 commit eaa3616

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)