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
The following commit(s) were added to refs/heads/master by this push:
new 576d9ba [test] check C++ client API for C++98 compatibility
576d9ba is described below
commit 576d9baecd4a5b7cfd80d273f5f4cd84a219de37
Author: Alexey Serbin <[email protected]>
AuthorDate: Wed Jun 16 23:58:35 2021 -0700
[test] check C++ client API for C++98 compatibility
This patch updates client_examples-test.sh to check Kudu C++ client API
for compatibility with legacy C++98 compilers.
Change-Id: I9fa8ab3409ff78c1deb268e982e0d77cace4100b
Reviewed-on: http://gerrit.cloudera.org:8080/17603
Reviewed-by: Bankim Bhavsar <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/client/client_examples-test.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/kudu/client/client_examples-test.sh
b/src/kudu/client/client_examples-test.sh
index 3f80d97..562bd1d 100755
--- a/src/kudu/client/client_examples-test.sh
+++ b/src/kudu/client/client_examples-test.sh
@@ -108,10 +108,17 @@ popd
# Test that all of the installed headers can be compiled on their own.
# This catches bugs where we've made a mistake in 'include-what-you-use'
# within the library.
+#
+# The API of the Kudu C++ client is supposed to be compatible with legacy C++
+# compilers talking C++98 standard at most, but Kudu uses C++17 internally
+# (as of June 2021). An extra flag -std=c++98 is added to catch changes
+# incompatible with C++98 in the exported files representing the API of
+# the Kudu C++ client.
for include_file in $(find "$LIBRARY_DIR" -name \*.h) ; do
echo Checking standalone compilation of "$include_file"...
if ! ${CXX:-g++} \
-o /dev/null \
+ -std=c++98 \
-I"$LIBRARY_DIR/usr/local/include" \
"$include_file" ; then
set +x