Skip to content

Commit

Permalink
build: 📦 improve cmake usage in build
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed Aug 6, 2023
1 parent a1feef5 commit a7d76aa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,21 @@ WORKDIR /tmp/hyperscan
FROM build_pcre AS build_hyperscan
ARG build_type
ARG pcre_version
RUN mkdir -p build
WORKDIR /tmp/hyperscan/build
WORKDIR /tmp/hyperscan
ENV CFLAGS="-fPIC"
ENV CXXFLAGS="$CFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
RUN cmake \
-S . \
-B build \
-DCMAKE_INSTALL_PREFIX=/opt/hyperscan \
-DFAT_RUNTIME=ON \
-DBUILD_STATIC_AND_SHARED=ON \
-DCMAKE_BUILD_TYPE=${build_type} \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DPCRE_SOURCE=../pcre \
../
RUN make -j$(nproc) && make install
-DPCRE_SOURCE=../pcre
RUN cmake --build build --parallel $(nproc)
RUN cmake --install build

FROM base
LABEL maintainer="David Gidwani <[email protected]>"
Expand Down

0 comments on commit a7d76aa

Please sign in to comment.