Skip to content

Commit

Permalink
fix bug for complie when using mingw and change name parser/generated
Browse files Browse the repository at this point in the history
  • Loading branch information
zwhzzz0821 committed Dec 12, 2024
1 parent 57a4834 commit ddad7f9
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 16 deletions.
12 changes: 5 additions & 7 deletions cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ set(SNAPPY_LIB_NAME "snappy")
set(LZ4_LIB_NAME "LZ4")
set(LZO_LIB_NAME "lzokay")
set(ZLIB_LIB_NAME "z")
set(ANTLR4_STATIC_LIB_PATH ${CMAKE_BINARY_DIR}/lib/libantlr4-runtime${CMAKE_STATIC_LIBRARY_SUFFIX})
set(ANTLR4_SHARED_LIB_PATH ${CMAKE_BINARY_DIR}/lib/libantlr4-runtime${CMAKE_SHARED_LIBRARY_SUFFIX})
target_link_libraries(parser_obj ${ANTLR4_STATIC_LIB_PATH} ${ANTLR4_SHARED_LIB_PATH})
target_link_libraries(compress_obj ${SNAPPY_LIB_NAME} ${LZ4_LIB_NAME} ${LZO_LIB_NAME} ${ZLIB_LIB_NAME})
target_link_libraries(common_obj ${SNAPPY_LIB_NAME} ${LZ4_LIB_NAME} ${LZO_LIB_NAME} ${ZLIB_LIB_NAME} ${ANTLR4_STATIC_LIB_PATH} ${ANTLR4_SHARED_LIB_PATH})
target_link_libraries(read_obj ${SNAPPY_LIB_NAME} ${LZ4_LIB_NAME} ${LZO_LIB_NAME} ${ZLIB_LIB_NAME})
target_link_libraries(write_obj ${SNAPPY_LIB_NAME} ${LZ4_LIB_NAME} ${LZO_LIB_NAME} ${ZLIB_LIB_NAME})
target_link_libraries(parser_obj antlr4_shared)
target_link_libraries(compress_obj ${SNAPPY_LIB_NAME} ${LZ4_LIB_NAME} ${LZO_LIB_NAME} ${ZLIB_LIB_NAME} antlr4_shared )
target_link_libraries(common_obj ${SNAPPY_LIB_NAME} ${LZ4_LIB_NAME} ${LZO_LIB_NAME} ${ZLIB_LIB_NAME} antlr4_shared )
target_link_libraries(read_obj ${SNAPPY_LIB_NAME} ${LZ4_LIB_NAME} ${LZO_LIB_NAME} ${ZLIB_LIB_NAME} antlr4_shared )
target_link_libraries(write_obj ${SNAPPY_LIB_NAME} ${LZ4_LIB_NAME} ${LZO_LIB_NAME} ${ZLIB_LIB_NAME} antlr4_shared )
# set(CMAKE_PREFIX_PATH ../../third-party/lz4-dev/lib)
# set(LZ4_LIB_DIR ../../third-party/lz4-dev/lib)
# find_library(my_lz4_lib NAMES lz4 PATHS ${LZ4_LIB_DIR} NO_DEFAULT_PATH REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/common/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define COMMON_READ_COMMON_PATH_H

#include "utils/errno_define.h"
#include "parser/generator/PathParser.h"
#include "parser/generated/PathParser.h"
#include "parser/path_nodes_generator.h"

#include <string>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cpp/src/parser/path_nodes_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#include "path_nodes_generator.h"
#include "utils/errno_define.h"
#include "generator/PathLexer.h"
#include "generator/PathParser.h"
#include "generated/PathLexer.h"
#include "generated/PathParser.h"
#include "path_parser_error.h"
#include "path_visitor.h"

Expand Down
4 changes: 2 additions & 2 deletions cpp/src/parser/path_visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#ifndef PATH_VISITOR_H
#define PATH_VISITOR_H

#include "generator/PathParserBaseVisitor.h"
#include "generator/PathParser.h"
#include "generated/PathParserBaseVisitor.h"
#include "generated/PathParser.h"
#include "common/constant/tsfile_constant.h"

namespace storage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ using namespace antlr4;
using namespace antlr4::atn;
using namespace antlrcpp;

LexerATNSimulator::SimState::~SimState() {
}

void LexerATNSimulator::SimState::reset() {
index = INVALID_INDEX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace atn {
protected:
class SimState {
public:
virtual ~SimState();
virtual ~SimState() {(void)0;}

protected:
size_t index;
Expand Down Expand Up @@ -95,7 +95,7 @@ namespace atn {

LexerATNSimulator(const ATN &atn, std::vector<dfa::DFA> &decisionToDFA, PredictionContextCache &sharedContextCache);
LexerATNSimulator(Lexer *recog, const ATN &atn, std::vector<dfa::DFA> &decisionToDFA, PredictionContextCache &sharedContextCache);
virtual ~LexerATNSimulator () {}
virtual ~LexerATNSimulator () {(void)0;}

virtual void copyState(LexerATNSimulator *simulator);
virtual size_t match(CharStream *input, size_t mode);
Expand Down

0 comments on commit ddad7f9

Please sign in to comment.