diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index dc6d29b684965d7b748f18b231474c20535d4ea5..6123712449b3aac82cb2810c723881b9aab4dc07 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -6,6 +6,7 @@ add_subdirectory(cutils) add_subdirectory(sha256) add_subdirectory(tar) add_subdirectory(http) +add_subdirectory(buffer) set(local_utils_srcs ${utils_top_srcs} @@ -13,6 +14,7 @@ set(local_utils_srcs ${SHA256_SRCS} ${CUTILS_SRCS} ${CONSOLE_SRCS} + ${BUFFER_SRCS} ) set(local_utils_incs @@ -21,6 +23,7 @@ set(local_utils_incs ${SHA256_INCS} ${CUTILS_INCS} ${CONSOLE_INCS} + ${BUFFER_INCS} ) if (GRPC_CONNECTOR) diff --git a/src/utils/buffer/CMakeLists.txt b/src/utils/buffer/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..6e9245ec181dcd897de9e4b2c27a424f42fdde33 --- /dev/null +++ b/src/utils/buffer/CMakeLists.txt @@ -0,0 +1,13 @@ +# get current directory sources files +aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} local_buffer_srcs) + +set(BUFFER_SRCS + ${local_buffer_srcs} + PARENT_SCOPE + ) + +set(BUFFER_INCS + ${CMAKE_CURRENT_SOURCE_DIR} + PARENT_SCOPE + ) + diff --git a/src/utils/http/buffer.c b/src/utils/buffer/buffer.c similarity index 100% rename from src/utils/http/buffer.c rename to src/utils/buffer/buffer.c diff --git a/src/utils/http/buffer.h b/src/utils/buffer/buffer.h similarity index 100% rename from src/utils/http/buffer.h rename to src/utils/buffer/buffer.h diff --git a/src/utils/http/CMakeLists.txt b/src/utils/http/CMakeLists.txt index c444e77bdaffc39f58165ac0775816dc55338ed3..741cb34e4cc4cdd53028886893502abb2b61e063 100644 --- a/src/utils/http/CMakeLists.txt +++ b/src/utils/http/CMakeLists.txt @@ -12,6 +12,7 @@ target_include_directories(libhttpclient PUBLIC ${CMAKE_SOURCE_DIR}/src/utils ${CMAKE_SOURCE_DIR}/src/utils/cutils ${CMAKE_SOURCE_DIR}/src/utils/http + ${CMAKE_SOURCE_DIR}/src/utils/buffer ${CHECKED_INCLUDE_DIRS} ) diff --git a/src/utils/http/rest_common.h b/src/utils/http/rest_common.h index bcade2cc649fc85152f73bea9f8e40b45b863c84..61187aa75099cb2f214a7f91d78a3216ed12d2a2 100644 --- a/src/utils/http/rest_common.h +++ b/src/utils/http/rest_common.h @@ -17,7 +17,7 @@ #include -#include "http/buffer.h" +#include "buffer.h" #include "http/http.h" #include "parser.h" @@ -49,4 +49,3 @@ void put_body(char *body); #endif #endif // UTILS_HTTP_REST_COMMON_H - diff --git a/test/image/oci/registry/CMakeLists.txt b/test/image/oci/registry/CMakeLists.txt index 4506c2fb9e4583845ef49470b52d647d7cf2d9bb..1d2c7a428359fd6ba2dea0dca6d93b609793cb15 100644 --- a/test/image/oci/registry/CMakeLists.txt +++ b/test/image/oci/registry/CMakeLists.txt @@ -21,7 +21,7 @@ add_executable(${EXE} ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/daemon/common/err_msg.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/daemon/config/daemon_arguments.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/utils/http/parser.c - ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/utils/http/buffer.c + ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/utils/buffer/buffer.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/utils/cutils/utils_aes.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/daemon/modules/image/oci/storage/image_store/image_type.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/daemon/config/isulad_config.c diff --git a/test/image/oci/storage/layers/CMakeLists.txt b/test/image/oci/storage/layers/CMakeLists.txt index c56bd32252517342bb884bb5a0fa5cb891340c74..e41060c123d2ab670938664b3519920f868e79ec 100644 --- a/test/image/oci/storage/layers/CMakeLists.txt +++ b/test/image/oci/storage/layers/CMakeLists.txt @@ -84,7 +84,7 @@ add_executable(${LAYER_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src/utils/cutils/path.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src/utils/cutils/map/map.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src/utils/cutils/map/rb_tree.c - ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src/utils/http/buffer.c + ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src/utils/buffer/buffer.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src/utils/tar/util_archive.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src/utils/tar/util_gzip.c ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src/utils/sha256/sha256.c