You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2023/04/22 00:11:47 UTC

[kudu] 02/02: [client] add -Werror flag for checking client C++ API

This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 8abe10cd693c4bfbc22868ba13cee23294eb6fb0
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Fri Apr 21 16:15:20 2023 -0700

    [client] add -Werror flag for checking client C++ API
    
    I noticed that many contemporary C++ compilers didn't error out but
    issued a warning instead when compiling a code with C++11 features,
    even if running with -std=c++98 flag.
    
    To make the API compatibility check more robust, this patch adds -Werror
    flag to make sure the client_examples-test.sh fails if incompatibility
    is introduced into corresponding header files.
    
    This is a follow-up to 10b1c30441dd48bebf692db8a41464cf08319908.
    
    Change-Id: Iae550774bd0aaf0b7bb8df7e64ee5b8b0fc22ac3
    Reviewed-on: http://gerrit.cloudera.org:8080/19784
    Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
    Tested-by: Alexey Serbin <al...@apache.org>
---
 src/kudu/client/client_examples-test.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/kudu/client/client_examples-test.sh b/src/kudu/client/client_examples-test.sh
index 8bf08ddbc..66ea5b94c 100755
--- a/src/kudu/client/client_examples-test.sh
+++ b/src/kudu/client/client_examples-test.sh
@@ -121,6 +121,7 @@ for include_file in $(find "$LIBRARY_DIR" -name \*.h) ; do
        -o /dev/null \
        -x c++ \
        -std=c++98 \
+       -Werror \
        -I"$LIBRARY_DIR/usr/local/include" - \
        < "$include_file" ; then
     set +x