<commit_before>cmake_minimum_required(VERSION 2.8.6)
project(kinetic_cpp_client_examples CXX C)

find_package (Threads)

set(CMAKE_CXX_FLAGS "-g --std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -DGTEST_USE_OWN_TR1_TUPLE=1")

set(GENERATED_SOURCES_PATH ${kinetic_cpp_client_SOURCE_DIR}/src/main/generated)

include(ExternalProject)
ExternalProject_add(
    kinetic_cpp_client
    PREFIX "vendor"
    GIT_REPOSITORY "<EMAIL>:seagate/kinetic_cpp_client.git"
    GIT_TAG origin/features/asynchronous-get
    BUILD_IN_SOURCE 1
    INSTALL_COMMAND ""
)

include_directories(
    vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/include
    vendor/src/kinetic_cpp_client/vendor/src/protobufutil/include
    vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/src/gmock/fused-src
    vendor/src/kinetic_cpp_client/src/main
    vendor/src/kinetic_cpp_client/src/main/generated
    vendor/src/kinetic_cpp_client/src/public_include
)

set(LIBRARY_DEPENDENCIES
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/libkinetic_client_library.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/libprotobufutil.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libglog.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libgflags.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libssl.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libcrypto.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libprotobuf.a
    ${CMAKE_THREAD_LIBS_INIT}
    dl
)

macro(add_example_target NAME)
    add_executable(${NAME} src/${NAME}.cc)
    target_link_libraries(${NAME} ${LIBRARY_DEPENDENCIES})
    add_dependencies(${NAME} kinetic_cpp_client)

    set_target_properties( ${NAME} PROPERTIES
        RUNTIME_OUTPUT_DIRECTORY_DEBUG   ${CMAKE_SOURCE_DIR}
        RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}
        ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}
        ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}
    )
endmacro(add_example_target)

add_example_target(hello_kinetic)
add_example_target(kineticstat)
add_example_target(async)
add_example_target(ise)
add_example_target(setclusterversion)
add_example_target(setpin)
add_example_target(set_acls)
add_example_target(write_file_blocking)
add_example_target(read_file_blocking)
add_example_target(read_file_nonblocking)
add_example_target(delete_file_nonblocking)
add_example_target(write_file_nonblocking)

<commit_msg>Update Kinetic C client repo<commit_after>cmake_minimum_required(VERSION 2.8.6)
project(kinetic_cpp_client_examples CXX C)

find_package (Threads)

set(CMAKE_CXX_FLAGS "-g --std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -DGTEST_USE_OWN_TR1_TUPLE=1")

set(GENERATED_SOURCES_PATH ${kinetic_cpp_client_SOURCE_DIR}/src/main/generated)

include(ExternalProject)
ExternalProject_add(
    kinetic_cpp_client
    PREFIX "vendor"
    GIT_REPOSITORY "<EMAIL>:Seagate/Kinetic-C-Client.git"
    GIT_TAG "origin/master"
    BUILD_IN_SOURCE 1
    INSTALL_COMMAND ""
)

include_directories(
    vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/include
    vendor/src/kinetic_cpp_client/vendor/src/protobufutil/include
    vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/src/gmock/fused-src
    vendor/src/kinetic_cpp_client/src/main
    vendor/src/kinetic_cpp_client/src/main/generated
    vendor/src/kinetic_cpp_client/src/public_include
)

set(LIBRARY_DEPENDENCIES
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/libkinetic_client_library.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/libprotobufutil.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libglog.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libgflags.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libssl.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libcrypto.a
    ${kinetic_cpp_client_examples_SOURCE_DIR}/vendor/src/kinetic_cpp_client/vendor/src/protobufutil/vendor/lib/libprotobuf.a
    ${CMAKE_THREAD_LIBS_INIT}
    dl
)

macro(add_example_target NAME)
    add_executable(${NAME} src/${NAME}.cc)
    target_link_libraries(${NAME} ${LIBRARY_DEPENDENCIES})
    add_dependencies(${NAME} kinetic_cpp_client)

    set_target_properties( ${NAME} PROPERTIES
        RUNTIME_OUTPUT_DIRECTORY_DEBUG   ${CMAKE_SOURCE_DIR}
        RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}
        ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}
        ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}
    )
endmacro(add_example_target)

add_example_target(hello_kinetic)
add_example_target(kineticstat)
add_example_target(async)
add_example_target(ise)
add_example_target(setclusterversion)
add_example_target(setpin)
add_example_target(set_acls)
add_example_target(write_file_blocking)
add_example_target(read_file_blocking)
add_example_target(read_file_nonblocking)
add_example_target(delete_file_nonblocking)
add_example_target(write_file_nonblocking)


{'fraction_non_alphanumeric': 0.09006099748833872, 'fraction_numerical': 0.0028704700394689632, 'mean_word_length': 6.863187588152328, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3339476', 'n_tokens_mistral': 2052, 'n_tokens_neox': 1958, 'n_words': 160}