From ebb93470c1fabd884cf9dd4cbbe4a281f80cc953 Mon Sep 17 00:00:00 2001 From: Aemiii91 <44569252+Aemiii91@users.noreply.github.com> Date: Thu, 29 Feb 2024 00:26:27 +0100 Subject: [PATCH] Add gtest setup (wip) --- Dockerfile | 7 ++++--- support/setup-gtest.sh | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100755 support/setup-gtest.sh diff --git a/Dockerfile b/Dockerfile index e14a69f..d08a9f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 diff --git a/support/setup-gtest.sh b/support/setup-gtest.sh new file mode 100755 index 0000000..80ffe22 --- /dev/null +++ b/support/setup-gtest.sh @@ -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