-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: 📦 improve cmake usage in build
- Loading branch information
Showing
1 changed file
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]>" | ||
|