HDFS-9737: libhdfs++: Create examples of consuming libhdfs++. Contributed by Bob Hansen

This commit is contained in:
Bob Hansen 2016-02-03 16:38:25 -05:00 committed by James Clampffer
parent 7e946c7e30
commit 71b4f2ea25
2 changed files with 12 additions and 0 deletions

View File

@ -124,6 +124,7 @@ include_directories( SYSTEM
add_subdirectory(third_party/gmock-1.7.0)
add_subdirectory(lib)
add_subdirectory(tests)
add_subdirectory(examples)
# create an empty file; hadoop_add_dual_library wraps add_library which
# requires at least one file as an argument
@ -170,3 +171,9 @@ install(FILES ${LIBHDFS_HEADER_FILES} DESTINATION /include/hdfs)
install(TARGETS hdfspp_static ARCHIVE DESTINATION /lib)
install(TARGETS hdfspp LIBRARY DESTINATION /lib)
add_custom_target(
InstallToBuildDirectory
COMMAND "${CMAKE_MAKE_PROGRAM}" install DESTDIR=${PROJECT_BINARY_DIR}/output
)
set(LIBHDFSPP_DIR ${PROJECT_BINARY_DIR}/output)

View File

@ -50,7 +50,9 @@
* Keep C bindings that are libhdfs++ specific in here.
**/
#ifdef __cplusplus
extern "C" {
#endif
/**
* Reads the last error, if any, that happened in this thread
* into the user supplied buffer.
@ -108,5 +110,8 @@ int hdfsBuilderConfGetStr(struct hdfsBuilder *bld, const char *key,
*/
int hdfsBuilderConfGetInt(struct hdfsBuilder *bld, const char *key, int32_t *val);
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif