Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/devcontainer #5

Merged
merged 2 commits into from
May 14, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,3 @@ RUN if [ "${REINSTALL_CLANG_VERSION_FROM_SOURCE}" != "none" ]; then \
chmod +x /tmp/reinstall-clang.sh && /tmp/reinstall-clang.sh ${REINSTALL_CLANG_VERSION_FROM_SOURCE}; \
fi \
&& rm -f /tmp/reinstall-clang.sh

ARG LIBS_DIR=/usr/local/lib
ARG ANTLR_SRC=/usr/local/src
ARG ANTLR_RUNTIME=${ANTLR_SRC}/antlr4/runtime/Cpp

# Add ANTLR4 JAR file
ADD https://www.antlr.org/download/antlr-4.13.1-complete.jar /tmp/antlr-4.13.1-complete.jar
RUN cp /tmp/antlr-4.13.1-complete.jar ${LIBS_DIR}/antlr-4.13.1-complete.jar && \
rm /tmp/antlr-4.13.1-complete.jar

# Download and build C++ ANTLR4 runtime
RUN git clone https://github.com/antlr/antlr4.git ${ANTLR_SRC}/antlr4
RUN mkdir ${ANTLR_RUNTIME}/build && \
cd ${ANTLR_RUNTIME}/build && \
cmake .. && \
make && \
make install

# Set environment variables
ENV CLASSPATH=".:${LIBS_DIR}/antlr-4.13.1-complete.jar:$CLASSPATH"
ENV PATH="${ANTLR_RUNTIME}/build/bin:$PATH"
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"customizations": {
"vscode": {
"extensions": [
"llvm-vs-code-extensions.vscode-clangd"
"llvm-vs-code-extensions.vscode-clangd",
"streetsidesoftware.code-spell-checker",
"donjayamanne.githistory"
]
}
}
Expand Down
6 changes: 5 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"recommendations": [
"ms-vscode.cpptools",
"josetr.cmake-language-support-vscode"
"josetr.cmake-language-support-vscode",
"llvm-vs-code-extensions.vscode-clangd",
"streetsidesoftware.code-spell-checker",
"donjayamanne.githistory",
"jeff-hykin.better-cpp-syntax"
]
}