Skip to content

Commit

Permalink
Add gtest setup (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aemiii91 committed Feb 28, 2024
1 parent c89c488 commit ebb9347
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ RUN rm -rf /var/lib/apt/lists/*
# Locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

# Workspace
RUN mkdir -p /root/workspace
Expand All @@ -52,6 +52,7 @@ COPY support .
RUN ./setup-toolchain.sh
RUN cat setup-env.sh >> .bashrc
RUN ./setup-sqlite.sh
RUN ./setup-gtest.sh

VOLUME /root/workspace
WORKDIR /root/workspace
Expand Down
7 changes: 7 additions & 0 deletions support/setup-gtest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
cd /usr/src/gtest
cmake -DCMAKE_C_COMPILER="${CROSS_COMPILE}gcc" -DCMAKE_CXX_COMPILER="${CROSS_COMPILE}g++" CMakeLists.txt
make
cp /usr/src/gtest/lib/*.a /usr/lib
ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a
ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a

0 comments on commit ebb9347

Please sign in to comment.