From 879f41ee7652ac4337852260bd1f46b2babd3e19 Mon Sep 17 00:00:00 2001 From: zwhzzz0821 <2831474076@qq.com> Date: Sun, 15 Dec 2024 15:25:55 +0800 Subject: [PATCH] Removed unnecessary include --- cpp/test/parser/path_name_test.cc | 17 ----------------- .../antlr4-cpp-runtime-4/CMakeLists.txt | 1 + 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/cpp/test/parser/path_name_test.cc b/cpp/test/parser/path_name_test.cc index 0c188ca87..933352202 100644 --- a/cpp/test/parser/path_name_test.cc +++ b/cpp/test/parser/path_name_test.cc @@ -18,29 +18,12 @@ */ #include -#include "parser/generated/PathParser.h" -#include "parser/generated/PathLexer.h" #include "common/path.h" namespace storage { class PathNameTest : public ::testing::Test {}; -TEST_F(PathNameTest, TestPathLexer) { - antlr4::ANTLRInputStream input(std::string("root.sg1.'.d1'.s1")); - PathLexer lexer(&input); - antlr4::CommonTokenStream tokens(&lexer); - tokens.fill(); - std::vector actualTokens; - for (const auto& token : tokens.getTokens()) { - if (token->getType() != antlr4::Token::EOF) { - actualTokens.push_back(token->getText()); - } - } - std::vector expectedTokens = {"root", ".", "sg1", ".", "'.d1'", ".", "s1"}; - EXPECT_EQ(actualTokens, expectedTokens); -} - TEST_F(PathNameTest, TestLegalPath) { // empty path Path a("", true); diff --git a/cpp/third_party/antlr4-cpp-runtime-4/CMakeLists.txt b/cpp/third_party/antlr4-cpp-runtime-4/CMakeLists.txt index a2b404063..a8d88dac6 100644 --- a/cpp/third_party/antlr4-cpp-runtime-4/CMakeLists.txt +++ b/cpp/third_party/antlr4-cpp-runtime-4/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.10) # 2.8 needed because of ExternalProject # Detect build type, fallback to release and throw a warning if use didn't specify any +set(CMAKE_POSITION_INDEPENDENT_CODE ON) if(NOT CMAKE_BUILD_TYPE) message(WARNING "Build type not set, falling back to Release mode. To specify build type use: