Skip to content

Commit cb63e60

Browse files
committed
Build tests with -pedantic
1 parent dd5b55a commit cb63e60

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

configure

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,47 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26142614
26152615
26162616
2617+
if test $cvd_conf_test = 1
2618+
then
2619+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2620+
$as_echo "yes" >&6; }
2621+
ts_success=yes
2622+
else
2623+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2624+
$as_echo "no" >&6; }
2625+
CXXFLAGS="$save_CXXFLAGS"
2626+
ts_success=no
2627+
fi
2628+
2629+
2630+
if test "" == ""
2631+
then
2632+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flag -pedantic works" >&5
2633+
$as_echo_n "checking if compiler flag -pedantic works... " >&6; }
2634+
else
2635+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking " >&5
2636+
$as_echo_n "checking ... " >&6; }
2637+
fi
2638+
save_CXXFLAGS="$CXXFLAGS"
2639+
CXXFLAGS="$CXXFLAGS -pedantic"
2640+
2641+
2642+
2643+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644+
/* end confdefs.h. */
2645+
int main(){}
2646+
_ACEOF
2647+
if ac_fn_cxx_try_compile "$LINENO"; then :
2648+
cvd_conf_test=1
2649+
else
2650+
cvd_conf_test=0
2651+
fi
2652+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2653+
2654+
2655+
2656+
2657+
26172658
if test $cvd_conf_test = 1
26182659
then
26192660
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ define([TEST_AND_SET_CXXFLAG],[
5656

5757
TEST_AND_SET_CXXFLAG(-Wall)
5858
TEST_AND_SET_CXXFLAG(-Wextra)
59+
TEST_AND_SET_CXXFLAG(-pedantic)
5960
TEST_AND_SET_CXXFLAG(-W)
6061
TEST_AND_SET_CXXFLAG(-O3)
6162
TEST_AND_SET_CXXFLAG(-Werror)

0 commit comments

Comments
 (0)