Skip to content

Commit

Permalink
Use a submodule for third_party/antlr4
Browse files Browse the repository at this point in the history
Signed-off-by: Dusty DeWeese <[email protected]>
  • Loading branch information
HackerFoo committed Dec 16, 2020
1 parent 8530708 commit cc684d0
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 472 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
[submodule "third_party/antlr4"]
path = third_party/antlr4
url = https://github.com/HackerFoo/antlr4.git
branch = fpic
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ prune docs/env

include src/*
include src/antlr/*
recursive-include third_party *
graft third_party
global-exclude .git
exclude .gitmodules
exclude .clang-format
Expand Down
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ set(CMAKE_CXX_STANDARD 11)
# required if linking to static library
add_definitions(-DANTLR4CPP_STATIC)

# To build a shared library
set(ANTLR4_POSITION_INDEPENDENT_CODE ON)

# add external build for antlrcpp
include(ExternalAntlr4Cpp)

Expand All @@ -26,7 +29,7 @@ include_directories(${ANTLR4_INCLUDE_DIRS})

# set variable pointing to the antlr tool that supports C++
# this is not required if the jar file can be found under PATH environment
set(ANTLR_EXECUTABLE ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/antlr4/antlr-4.9-complete.jar)
set(ANTLR_EXECUTABLE ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/antlr4_lib/antlr-4.9-complete.jar)

# add macros to generate ANTLR Cpp code from grammar
find_package(ANTLR REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions third_party/antlr4
Submodule antlr4 added at bb74e9
155 changes: 0 additions & 155 deletions third_party/antlr4/runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake

This file was deleted.

124 changes: 0 additions & 124 deletions third_party/antlr4/runtime/Cpp/cmake/FindANTLR.cmake

This file was deleted.

Loading

0 comments on commit cc684d0

Please sign in to comment.