diff --git a/src/graph/context/test/CMakeLists.txt b/src/graph/context/test/CMakeLists.txt index 02d05be1d42..38b63342169 100644 --- a/src/graph/context/test/CMakeLists.txt +++ b/src/graph/context/test/CMakeLists.txt @@ -41,6 +41,7 @@ SET(CONTEXT_TEST_LIBS $ $ $ + $ ) nebula_add_test( diff --git a/src/graph/executor/test/CMakeLists.txt b/src/graph/executor/test/CMakeLists.txt index 484240809bd..f504df3b93e 100644 --- a/src/graph/executor/test/CMakeLists.txt +++ b/src/graph/executor/test/CMakeLists.txt @@ -48,6 +48,7 @@ SET(EXEC_QUERY_TEST_OBJS $ $ $ + $ ) SET(EXEC_QUERY_TEST_LIBS diff --git a/src/graph/optimizer/test/CMakeLists.txt b/src/graph/optimizer/test/CMakeLists.txt index a1fa426ac72..e770ab36a40 100644 --- a/src/graph/optimizer/test/CMakeLists.txt +++ b/src/graph/optimizer/test/CMakeLists.txt @@ -44,6 +44,7 @@ set(OPTIMIZER_TEST_LIB $ $ $ + $ ) nebula_add_test( diff --git a/src/graph/planner/test/CMakeLists.txt b/src/graph/planner/test/CMakeLists.txt index b4de1974764..a994551d288 100644 --- a/src/graph/planner/test/CMakeLists.txt +++ b/src/graph/planner/test/CMakeLists.txt @@ -48,6 +48,7 @@ nebula_add_test( $ $ $ + $ LIBRARIES gtest ${PROXYGEN_LIBRARIES} diff --git a/src/graph/service/GraphFlags.cpp b/src/graph/service/GraphFlags.cpp index 64cd6617414..515d6f105f1 100644 --- a/src/graph/service/GraphFlags.cpp +++ b/src/graph/service/GraphFlags.cpp @@ -6,6 +6,8 @@ #include "graph/service/GraphFlags.h" +#include "version/Version.h" + DEFINE_int32(port, 3699, "Nebula Graph daemon's listen port"); DEFINE_int32(client_idle_timeout_secs, 0, @@ -68,5 +70,5 @@ DEFINE_bool(enable_experimental_feature, false, "Whether to enable experimental DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list."); DEFINE_string(client_white_list, - "2.5.0:2.5.1", + nebula::getOriginVersion() + ":2.5.0:2.5.1", "A white list for diffrent client versions, seperate with colon."); diff --git a/src/graph/util/test/CMakeLists.txt b/src/graph/util/test/CMakeLists.txt index 745ab224efe..8cd55ccbf3e 100644 --- a/src/graph/util/test/CMakeLists.txt +++ b/src/graph/util/test/CMakeLists.txt @@ -43,6 +43,7 @@ nebula_add_test( $ $ $ + $ LIBRARIES gtest gtest_main diff --git a/src/meta/processors/admin/VerifyClientVersionProcessor.cpp b/src/meta/processors/admin/VerifyClientVersionProcessor.cpp index 8bba9384f32..a5dfeb42e4a 100644 --- a/src/meta/processors/admin/VerifyClientVersionProcessor.cpp +++ b/src/meta/processors/admin/VerifyClientVersionProcessor.cpp @@ -6,9 +6,11 @@ #include "meta/processors/admin/VerifyClientVersionProcessor.h" +#include "version/Version.h" + DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list."); DEFINE_string(client_white_list, - "2.5.0:2.5.1", + nebula::getOriginVersion() + ":2.5.0:2.5.1", "A white list for diffrent client versions, seperate with colon."); namespace nebula { diff --git a/src/parser/test/CMakeLists.txt b/src/parser/test/CMakeLists.txt index 260722922d4..afe5ce7bc4f 100644 --- a/src/parser/test/CMakeLists.txt +++ b/src/parser/test/CMakeLists.txt @@ -43,6 +43,7 @@ set(PARSER_TEST_LIBS $ $ $ + $ ) nebula_add_test( diff --git a/src/version/Version.cpp.in b/src/version/Version.cpp.in index c4187744c4d..82f956efe6e 100644 --- a/src/version/Version.cpp.in +++ b/src/version/Version.cpp.in @@ -31,4 +31,11 @@ std::string versionString(bool verbose) { return version; } +std::string getOriginVersion() { +#if defined(NEBULA_BUILD_VERSION) + return NEBULA_BUILD_VERSION; +#else + return ""; +#endif +} } // namespace nebula diff --git a/src/version/Version.h b/src/version/Version.h index bf04072cada..51a1f1585d5 100644 --- a/src/version/Version.h +++ b/src/version/Version.h @@ -13,6 +13,7 @@ namespace nebula { std::string gitInfoSha(); std::string versionString(bool verbose = true); +std::string getOriginVersion(); } // namespace nebula