mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dll feature test: output #error directive on failure
A common cause of build failures on some systems is that the output block in the dll feature test silently fails to compile. This leads to very-hard-to-trace compiler errors about missing identifiers later on. iffe syntax does not allow aborting compilation if a block does not compile, however, it does let us produce alternative output from a shell script if compilation fails. This can be used to generate an informative #error directive that is inserted in place of the missing identifiers. src/lib/libdll/features/dll: - Add fail block to output block that produces an #error directive.
This commit is contained in:
parent
820bb6a04b
commit
e20c0c6b5d
1 changed files with 2 additions and 0 deletions
|
@ -261,4 +261,6 @@ tst - output{
|
||||||
printf("\n");
|
printf("\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}end fail{
|
||||||
|
echo '#error The output block in src/lib/libdll/features/dll failed to compile'
|
||||||
}end
|
}end
|
||||||
|
|
Loading…
Reference in a new issue