diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b115e14c9a5f76f876c0599a18ed6bdd206a2bbe..481618f207ab789b8aaaa36b093a50002076a15b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -162,7 +162,7 @@ endif() set_source_files_compile_flags(${server_sources}) add_library(server STATIC ${server_sources}) -target_link_libraries(server core http_parser bit uri uuid ${ICU_LIBRARIES}) +target_link_libraries(server core coll http_parser bit uri uuid) # Rule of thumb: if exporting a symbol from a static library, list the # library here. diff --git a/src/box/coll_id.c b/src/box/coll_id.c index b56c749617d1702662368a5b86948743823bfa20..5abeaed21f1a0c311e07bf94265be869412c7d7c 100644 --- a/src/box/coll_id.c +++ b/src/box/coll_id.c @@ -30,7 +30,7 @@ */ #include "coll_id.h" #include "coll_id_def.h" -#include "coll.h" +#include "coll/coll.h" #include "error.h" #include "diag.h" diff --git a/src/box/coll_id_def.h b/src/box/coll_id_def.h index 489280c00b5d16850d3178c828b069ab03811e4c..85920927469f001a775e2f38c66a7ceaea8b1cc9 100644 --- a/src/box/coll_id_def.h +++ b/src/box/coll_id_def.h @@ -33,7 +33,7 @@ #include <stddef.h> #include <stdint.h> -#include <coll_def.h> +#include "coll/coll_def.h" #include "opt_def.h" /** Collation identifier definition. */ diff --git a/src/box/sql/expr.c b/src/box/sql/expr.c index c914cfb68a4cef668d9ffab2684502dd400beabb..a75f2375637d99aec290da8557e1382a2e649940 100644 --- a/src/box/sql/expr.c +++ b/src/box/sql/expr.c @@ -34,7 +34,7 @@ * for generating VDBE code that evaluates expressions in sql. */ #include "box/coll_id_cache.h" -#include "coll.h" +#include "coll/coll.h" #include "sqlInt.h" #include "tarantoolInt.h" #include "box/schema.h" diff --git a/src/box/sql/fk_constraint.c b/src/box/sql/fk_constraint.c index 93c01a0e7b92b47a9fc19cb861b848e392d1eefb..4066b1cf1cb3fe01122e2c60cc96dcb00518a502 100644 --- a/src/box/sql/fk_constraint.c +++ b/src/box/sql/fk_constraint.c @@ -33,7 +33,7 @@ * This file contains code used by the compiler to add foreign key * support to compiled SQL statements. */ -#include "coll.h" +#include "coll/coll.h" #include "sqlInt.h" #include "box/fk_constraint.h" #include "box/schema.h" diff --git a/src/box/sql/func.c b/src/box/sql/func.c index 69571e984d9a4b6c8e2c4fad20ce79fdd17cb617..267a18e0890b486e530b203fa66c12f42b648d2f 100644 --- a/src/box/sql/func.c +++ b/src/box/sql/func.c @@ -37,7 +37,7 @@ #include "sqlInt.h" #include "vdbeInt.h" #include "version.h" -#include "coll.h" +#include "coll/coll.h" #include <unicode/ustring.h> #include <unicode/ucasemap.h> #include <unicode/ucnv.h> diff --git a/src/box/sql/select.c b/src/box/sql/select.c index d9c63377d0f45399210ab3fd686f8bc4a8247ec8..782da1f7cb69017ac024ee1c452365262a907224 100644 --- a/src/box/sql/select.c +++ b/src/box/sql/select.c @@ -33,7 +33,7 @@ * This file contains C code routines that are called by the parser * to handle SELECT statements in sql. */ -#include "coll.h" +#include "coll/coll.h" #include "sqlInt.h" #include "tarantoolInt.h" #include "vdbeInt.h" diff --git a/src/box/sql/vdbeaux.c b/src/box/sql/vdbeaux.c index 071609d83424c077e87c63200043750c42408566..0cc3c148740ad668338773530ee0fcb1707fad60 100644 --- a/src/box/sql/vdbeaux.c +++ b/src/box/sql/vdbeaux.c @@ -34,7 +34,7 @@ * a VDBE (or an "sql_stmt" as it is known to the outside world.) */ #include "fiber.h" -#include "coll.h" +#include "coll/coll.h" #include "box/session.h" #include "box/schema.h" #include "box/tuple_format.h" diff --git a/src/box/sql/where.c b/src/box/sql/where.c index 5345ddd444117e8b684e4850571cddcfeb9b6f09..5a3c9be1a5eda420341f4c30e6e322b75055fdb0 100644 --- a/src/box/sql/where.c +++ b/src/box/sql/where.c @@ -37,7 +37,7 @@ * so is applicable. Because this module is responsible for selecting * indices, you might also think of this module as the "query optimizer". */ -#include "coll.h" +#include "coll/coll.h" #include "sqlInt.h" #include "tarantoolInt.h" #include "vdbeInt.h" diff --git a/src/box/sql/whereexpr.c b/src/box/sql/whereexpr.c index fa906e30554873c7c778ae491d34338561d0189c..6df28ad8ad6e13cee69678aa7c3e5fe19508e827 100644 --- a/src/box/sql/whereexpr.c +++ b/src/box/sql/whereexpr.c @@ -38,7 +38,7 @@ * analyzing Expr objects in the WHERE clause. */ #include "box/coll_id_cache.h" -#include "coll.h" +#include "coll/coll.h" #include "sqlInt.h" #include "whereInt.h" diff --git a/src/box/tuple_compare.cc b/src/box/tuple_compare.cc index cbdd150b8f76195b7a8fb2ecd22be66f697968ef..cf4519ccbf5bbcd737b0415940730cbf5bca4fb3 100644 --- a/src/box/tuple_compare.cc +++ b/src/box/tuple_compare.cc @@ -30,7 +30,7 @@ */ #include "tuple_compare.h" #include "tuple.h" -#include "coll.h" +#include "coll/coll.h" #include "trivia/util.h" /* NOINLINE */ #include <math.h> diff --git a/src/box/tuple_hash.cc b/src/box/tuple_hash.cc index 0aed4c14cbb99ce01586a02fa7f3fbfb7ed5dd83..9ee43550386c39815135ceaa935fc5056dd4615a 100644 --- a/src/box/tuple_hash.cc +++ b/src/box/tuple_hash.cc @@ -32,7 +32,7 @@ #include "tuple_hash.h" #include "tuple.h" #include "third_party/PMurHash.h" -#include "coll.h" +#include "coll/coll.h" #include <math.h> /* Tuple and key hasher */ diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 9e90c75aba7076f33cdbf1320fc1684fe8afe597..39795bbaef3bc687ddfb5fbbba47f1a4cf77f1b8 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -9,6 +9,7 @@ add_subdirectory(uri) add_subdirectory(http_parser) add_subdirectory(core) add_subdirectory(uuid) +add_subdirectory(coll) if(ENABLE_BUNDLED_MSGPUCK) add_subdirectory(msgpuck EXCLUDE_FROM_ALL) endif() diff --git a/src/lib/coll/CMakeLists.txt b/src/lib/coll/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c01e608bb108d0b036f780a47edb912e370b73ee --- /dev/null +++ b/src/lib/coll/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(coll STATIC coll.c coll_def.c) +target_link_libraries(coll core ${ICU_LIBRARIES}) diff --git a/src/lib/core/coll.c b/src/lib/coll/coll.c similarity index 100% rename from src/lib/core/coll.c rename to src/lib/coll/coll.c diff --git a/src/lib/core/coll.h b/src/lib/coll/coll.h similarity index 100% rename from src/lib/core/coll.h rename to src/lib/coll/coll.h diff --git a/src/lib/core/coll_def.c b/src/lib/coll/coll_def.c similarity index 100% rename from src/lib/core/coll_def.c rename to src/lib/coll/coll_def.c diff --git a/src/lib/core/coll_def.h b/src/lib/coll/coll_def.h similarity index 100% rename from src/lib/core/coll_def.h rename to src/lib/coll/coll_def.h diff --git a/src/lib/core/CMakeLists.txt b/src/lib/core/CMakeLists.txt index 6238f3ceeafb8e6dbe994d73b0aa51fb70dab86b..eb10b11c3fd7156af2ed5ee99df1fe04d0ab64cb 100644 --- a/src/lib/core/CMakeLists.txt +++ b/src/lib/core/CMakeLists.txt @@ -24,8 +24,6 @@ set(core_sources util.c random.c trigger.cc - coll.c - coll_def.c mpstream.c port.c ) diff --git a/src/lua/utf8.c b/src/lua/utf8.c index 6d3e4d39acd2ebf6bbf724d5af20930e68ed63bc..a009a4655813e5f32a08073d2a7ae9e3dd6581d7 100644 --- a/src/lua/utf8.c +++ b/src/lua/utf8.c @@ -30,7 +30,7 @@ */ #include <unicode/ucasemap.h> #include <unicode/uchar.h> -#include <coll.h> +#include "coll/coll.h" #include "lua/utils.h" #include "lua/utf8.h" #include "diag.h" diff --git a/src/main.cc b/src/main.cc index df746890782c7126bfa098952e64864402598c6e..39d5fb3510e613bbf5bf752dfc17519496e02a32 100644 --- a/src/main.cc +++ b/src/main.cc @@ -58,7 +58,7 @@ #include <say.h> #include <rmean.h> #include <limits.h> -#include "coll.h" +#include "coll/coll.h" #include "trivia/util.h" #include "backtrace.h" #include "tt_pthread.h" diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 18118d3746f7b4f1203ec1c38b6551270e007724..04bc659e792929d3e0224cf964874b8f84bf8d9b 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -193,7 +193,7 @@ add_executable(vy_cache.test vy_cache.c ${ITERATOR_TEST_SOURCES}) target_link_libraries(vy_cache.test ${ITERATOR_TEST_LIBS}) add_executable(coll.test coll.cpp) -target_link_libraries(coll.test core unit ${ICU_LIBRARIES} misc) +target_link_libraries(coll.test coll unit misc) add_executable(tuple_bigref.test tuple_bigref.c) target_link_libraries(tuple_bigref.test tuple unit) diff --git a/test/unit/coll.cpp b/test/unit/coll.cpp index 94374a7b0689acce90c1631f8e0c0f033fd3a037..5a7f49195fa096c0242000bf69710a3ba5076f80 100644 --- a/test/unit/coll.cpp +++ b/test/unit/coll.cpp @@ -7,8 +7,8 @@ #include <diag.h> #include <fiber.h> #include <memory.h> -#include "coll_def.h" -#include "coll.h" +#include "coll/coll_def.h" +#include "coll/coll.h" #include "unit.h" #include "third_party/PMurHash.h"