Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
- Migrate test system to `gtest`
- Remove optional search triples support

- **Build system**:
- Remove antlr4 static dependency, use shared library instead
## v0.6.0

- **Build system**:
Expand Down
12 changes: 7 additions & 5 deletions sc-memory/sc-memory/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
set (SC_MACHINE_ANTRL_DIR "${SC_MACHINE_THIRDPARTY_PATH}/antlr")

find_package(antlr4-runtime REQUIRED)

add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/scs/scsLexer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/scs/scsLexer.h"
"${CMAKE_CURRENT_LIST_DIR}/scs/scsParser.cpp"
"${CMAKE_CURRENT_LIST_DIR}/scs/scsParser.h"
COMMAND "${Java_JAVA_EXECUTABLE}" -jar "${SC_MACHINE_ANTRL_DIR}/antlr-4.7.1-complete.jar" scs.g4 -no-listener -package scs
COMMAND antlr scs.g4 -no-listener -package scs
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/scs"
DEPENDS scs/scs.g4
)
Expand All @@ -26,31 +28,31 @@ file(GLOB_RECURSE SOURCES "*.cpp" "*.hpp")
add_library (sc-memory SHARED ${SOURCES} ${SOURCES_PARSER})

target_include_directories(sc-memory
PRIVATE ${ANTLR4_INCLUDE_DIR}
PRIVATE ${GLIB2_INCLUDE_DIRS}
PRIVATE ${SC_MACHINE_ANTRL_DIR}/runtime/src
PRIVATE ${SC_MEMORY_SRC}
PRIVATE ${PYTHON_INCLUDE_DIRS})

if (${WIN32})
target_link_libraries(sc-memory
sc-core ${LIBCURL_LIBRARIES} ${PYTHON_LIBRARY_RELEASE}
antlr4_static
antlr4_shared
debug ${BOOST_PYTHON_LIBRARY_DEBUG}
optimized ${BOOST_PYTHON_LIBRARY_RELEASE})
elseif (${UNIX})
target_link_libraries(sc-memory
sc-core
antlr4_static
antlr4_shared
${LIBCURL_LIBRARIES}
${PYTHON_LIBRARIES}
${Boost_LIBRARIES})
endif(${WIN32})

sc_codegen_ex(sc-memory ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/generated")
add_dependencies(sc-memory
antlr4_shared
sc-core
sc-code-generator
antlr4_static
SCsParser)

target_compile_definitions(sc-memory PRIVATE "-DSC_MEMORY_SELF_BUILD")
2 changes: 1 addition & 1 deletion scripts/install_deps_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ sudo apt-get update
sudo apt-get install -y librocksdb-dev \
qt5-qmake qtbase5-dev libglib2.0-dev libboost-system-dev \
libboost-filesystem-dev libboost-program-options-dev \
make cmake antlr gcc g++ llvm-7 \
make cmake antlr4 libantlr4-runtime-dev gcc g++ llvm-7 \
libcurl4-openssl-dev libclang-7-dev libboost-python-dev \
python3-dev python3 python3-pip python3-setuptools
3 changes: 0 additions & 3 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# build antlr4 runtime
add_subdirectory(antlr/runtime)

if (${SC_BUILD_TESTS})
include(gtest.cmake)
include(benchmark.cmake)
Expand Down
Binary file removed thirdparty/antlr/antlr-4.7.1-complete.jar
Binary file not shown.
123 changes: 0 additions & 123 deletions thirdparty/antlr/runtime/CMakeLists.txt

This file was deleted.

Loading