Commit 69b423b2 authored by Florian Brosch's avatar Florian Brosch Committed by Luca Bruno

Warn if C files are used in combination with -C

parent 4cef298f
......@@ -292,16 +292,22 @@ class Vala.Compiler {
context.codegen = new GDBusServerModule ();
bool has_c_files = false;
bool has_h_files = false;
foreach (string source in sources) {
if (context.add_source_filename (source, run_output, true)) {
if (source.has_suffix (".c")) {
has_c_files = true;
} else if (source.has_suffix (".h")) {
has_h_files = true;
}
}
}
sources = null;
if (ccode_only && (has_c_files || has_h_files)) {
Report.warning (null, "C header and source files are ignored when -C or --ccode is set");
}
if (context.report.get_errors () > 0 || (fatal_warnings && context.report.get_warnings () > 0)) {
return quit ();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment