This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch branch-1.17.x in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 97af942d14d48b59956e4977b6f91498c2572117 Author: Alexey Serbin <[email protected]> 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 <[email protected]> Tested-by: Kudu Jenkins Reviewed-on: http://gerrit.cloudera.org:8080/19941 Reviewed-by: Yingchun Lai <[email protected]> Tested-by: Yingchun Lai <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- 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)
