Skip to content

Commit 59fe5c3

Browse files
committed
Consider PROJECT_OPTION to be a valid condition
1 parent dcdc7ac commit 59fe5c3

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
@@ -879,7 +879,7 @@ bool Project::cmake_minimum_version(int major, int minor) const {
879879
bool Project::is_condition_name(const std::string &name) {
880880
auto is_named_condition = true;
881881
for (auto ch : name) {
882-
if (!(ch == '-' || (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z'))) {
882+
if (!std::isalnum(ch) && ch != '-' && ch != '_') {
883883
return false;
884884
}
885885
}

0 commit comments

Comments
 (0)