mirror of
https://github.com/curl/curl.git
synced 2026-05-29 01:37:27 +03:00
mk-unity.pl: #include, and not concatenate input headers
When using `-D_CURL_TESTS_CONCAT=ON` with CMake, do not concatenate `first.h` (or any future header) into the output C file, but `#include` it instead. This is to play nice with compilers and analyzers which may apply different checker rules on logic found in headers, vs. the input source file. As seen for example with `-Wunused-macro` enabled in CI. After this patch concatenated sources behave closer to regular C sources. Also: - first.h: drop some `-Wunused-macro` silencers that became redundant with this patch. Follow-up to47f411c6d8#21554 Follow-up to39542f0993#20667 Closes #21656
This commit is contained in:
parent
240408a725
commit
a55750af0b
2 changed files with 2 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ foreach my $src (@ARGV) {
|
|||
|
||||
sub include($@) {
|
||||
my $filename = shift;
|
||||
if($concat) {
|
||||
if($concat && $filename =~ /([a-z0-9_]+)\.c$/) {
|
||||
if(! -f $filename) {
|
||||
foreach my $path (@incpath) {
|
||||
my $fullfn = $path . "/" . $filename;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue