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 555885a19 [examples] make client_examples-test.sh pass 555885a19 is described below commit 555885a194da8df8bb79d5f3803a869a69ece29a Author: Alexey Serbin <ale...@apache.org> AuthorDate: Tue Apr 18 17:56:56 2023 -0700 [examples] make client_examples-test.sh pass Since the newly introduced non_unique_primary_key.cc example uses features not available in C++98, an extra flag is needed if compiling the example with legacy compilers. Otherwise, client_examples-test.sh would fail while trying to compile it. Change-Id: I4cc2e60372b5ff855316a3286662d2f148f9ce7c Reviewed-on: http://gerrit.cloudera.org:8080/19766 Reviewed-by: Abhishek Chennaka <achenn...@cloudera.com> Tested-by: Kudu Jenkins --- examples/cpp/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index 688aaf149..740ee1b1b 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -26,5 +26,11 @@ include_directories(${KUDU_CLIENT_INCLUDE_DIR}) add_executable(example example.cc) target_link_libraries(example kudu_client) +# While Kudu C++ client API is still compatible with C++98, the example that +# demonstrates non-unique keys and auto-incrementing column uses features +# not available in C++98, so -std=c++0x is added to compile the example code +# with legacy compilers. +set_source_files_properties(non_unique_primary_key.cc PROPERTIES + COMPILE_FLAGS -std=c++0x) add_executable(non_unique_primary_key non_unique_primary_key.cc) target_link_libraries(non_unique_primary_key kudu_client)