build-unit-test-docker: Break out common meson flags
This helps us remain consistent for all builds.
Change-Id: I1dc024a1d27bdde95b5e2a2cc29fcf9a085aa3e5
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index 2563efd..5a94724 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -139,6 +139,9 @@
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}"
)
+MESON_FLAGS=(
+ "-Dprefix=${PREFIX}"
+)
stagename()
{
@@ -383,7 +386,7 @@
COPY --from=openbmc-span-lite ${PREFIX} ${PREFIX}
RUN curl -L https://github.com/openbmc/stdplus/archive/${PKG_REV['openbmc/stdplus']}.tar.gz | tar -xz && \
cd stdplus-* && \
-meson build -Dprefix=${PREFIX} -Dtests=disabled -Dexamples=false && \
+meson build ${MESON_FLAGS[@]} -Dtests=disabled -Dexamples=false && \
ninja -C build && \
ninja -C build install
@@ -391,7 +394,7 @@
COPY --from=openbmc-googletest ${PREFIX} ${PREFIX}
RUN curl -L https://github.com/openbmc/sdbusplus/archive/${PKG_REV['openbmc/sdbusplus']}.tar.gz | tar -xz && \
cd sdbusplus-* && \
-meson build -Dprefix=${PREFIX} && \
+meson build ${MESON_FLAGS[@]} && \
ninja -C build && \
ninja -C build install && \
cd tools && \
@@ -402,7 +405,7 @@
COPY --from=openbmc-stdplus ${PREFIX} ${PREFIX}
RUN curl -L https://github.com/openbmc/sdeventplus/archive/${PKG_REV['openbmc/sdeventplus']}.tar.gz | tar -xz && \
cd sdeventplus-* && \
-meson build -Dprefix=${PREFIX} -Dtests=disabled -Dexamples=false && \
+meson build ${MESON_FLAGS[@]} -Dtests=disabled -Dexamples=false && \
ninja -C build && \
ninja -C build install
@@ -410,7 +413,7 @@
COPY --from=openbmc-stdplus ${PREFIX} ${PREFIX}
RUN curl -L https://github.com/openbmc/gpioplus/archive/${PKG_REV['openbmc/gpioplus']}.tar.gz | tar -xz && \
cd gpioplus-* && \
-meson build -Dprefix=${PREFIX} -Dtests=disabled -Dexamples=false && \
+meson build ${MESON_FLAGS[@]} -Dtests=disabled -Dexamples=false && \
ninja -C build && \
ninja -C build install
@@ -477,7 +480,7 @@
COPY --from=openbmc-CLI11 ${PREFIX} ${PREFIX}
RUN curl -L https://github.com/openbmc/pldm/archive/${PKG_REV['openbmc/pldm']}.tar.gz | tar -xz && \
cd pldm-* && \
-meson build -Dprefix=${PREFIX} -Dtests=disabled && \
+meson build ${MESON_FLAGS[@]} -Dtests=disabled && \
ninja -C build && \
ninja -C build install