Skip to content

Commit

Permalink
downgrade misleading cmakedefine to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
annacrombie committed Jan 8, 2024
1 parent 4bbda20 commit e5f0751
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/functions/kernel/configure_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,18 @@ substitute_config(struct workspace *wk, uint32_t dict, uint32_t in_node, const c
}
} else {
extraneous_cmake_chars:
error_messagef(&src, id_start_line, i - start_of_line + 1, log_error,
"cmakedefine only supports two modes:\n"
"\t--> #cmakedefine %.*s\n "
"\t--> #cmakedefine %.*s @%.*s@\n"
"In particular, no value other than \"%.*s\" will be substituted and\n"
"no extra characters (comments, etc.) are allowed on the line.",
id_len, &src.src[id_start],
id_len, &src.src[id_start],
id_len, &src.src[id_start],
id_len, &src.src[id_start]
);
return false;
{
uint32_t orig_i = i;

while (src.src[i] && src.src[i] != '\n') {
++i;
}

error_messagef(&src, id_start_line, orig_i - start_of_line + 1, log_warn,
"ignoring trailing characters (%.*s) in cmakedefine",
i - orig_i, &src.src[orig_i]
);
}
}
} else {
error_messagef(&src, id_start_line, i - start_of_line + 1, log_error, "expected exactly one token on mesondefine line");
Expand Down

0 comments on commit e5f0751

Please sign in to comment.