From c31886f651e2daba45b93a22f56e296d5a97e04e Mon Sep 17 00:00:00 2001 From: Ruslan Mullakhmetov Date: Sun, 5 Apr 2015 13:15:41 +0300 Subject: [PATCH] modified headers_check.sh to check for for c++ inclusion correctness --- headers_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/headers_test.sh b/headers_test.sh index cbd7203..99cc906 100755 --- a/headers_test.sh +++ b/headers_test.sh @@ -15,8 +15,8 @@ for HDR in $HEADER_LIST do test_file=$(echo $HDR | sed -e 's|/|_|g;s|\.h$||') echo "Testing: $HDR" - printf "#include \"$HDR\"\n\nint main(void) { return 0; }\n" > $test_file.c - gcc -I.. -Werror -Wall -Wextra -Wno-unused -Wno-sign-compare -Wformat-security $test_file.c -o $test_file + printf "#include \"$HDR\"\n\nint main(void) { return 0; }\n" > $test_file.cpp + gcc -I.. -Werror -Wall -Wextra -Wno-unused -Wno-sign-compare -Wformat-security $test_file.cpp -o $test_file [ $? != 0 ] && exit 1 - rm $test_file $test_file.c + rm $test_file $test_file.cpp done