Docker fixes

This commit is contained in:
simon987 2022-02-12 11:12:53 -05:00
parent d58fcbc788
commit 065146ff8a
4 changed files with 25 additions and 9 deletions

View File

@ -27,4 +27,5 @@ sist2
**/ext_libmobi
**/ext_libwpd
**/core
*.a
*.a
tmp_scan/

View File

@ -21,7 +21,6 @@ set(ARGPARSE_SHARED off)
add_subdirectory(third-party/argparse)
add_executable(sist2
src/main.c
src/sist.h
src/io/walk.h src/io/walk.c

View File

@ -3,11 +3,11 @@ MAINTAINER simon987 <me@simon987.net>
WORKDIR /build/
COPY . .
RUN cmake -DSIST_PLATFORM=x64_linux -DSIST_DEBUG=off -DBUILD_TESTS=off -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake .
RUN cmake -DSIST_PLATFORM=x64_linux -DSIST_DEBUG=on -DBUILD_TESTS=off -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake .
RUN make -j$(nproc)
RUN strip sist2
RUN strip sist2 || mv sist2_debug sist2
FROM ubuntu:21.10
FROM --platform="linux/amd64" ubuntu:21.10
RUN apt update && apt install -y curl libasan5 && rm -rf /var/lib/apt/lists/*

View File

@ -6,10 +6,26 @@ set(CMAKE_C_STANDARD 11)
option(BUILD_TESTS "Build tests" on)
add_subdirectory(third-party/antiword)
add_compile_definitions(
antiword
NDEBUG
)
if (SIST_DEBUG)
add_compile_definitions(
antiword
DEBUG
)
else()
add_compile_definitions(
antiword
NDEBUG
)
target_compile_options(
antiword
PRIVATE
-g
-fstack-protector
-fno-omit-frame-pointer
-fsanitize=address
-fno-inline
)
endif()
add_library(
scan