move build system to cmake
This commit is contained in:
parent
c31db4d2a8
commit
734e37de37
|
@ -1,8 +1,10 @@
|
|||
FROM alpine as build-env
|
||||
|
||||
RUN apk add --no-cache build-base python3
|
||||
RUN apk add --no-cache build-base python3 cmake
|
||||
COPY ./src/ .
|
||||
RUN make build-release
|
||||
RUN rm -rf CMakeCache.txt CMakeFiles
|
||||
RUN cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
RUN make anthracite-bin
|
||||
|
||||
FROM alpine
|
||||
RUN apk add --no-cache build-base
|
||||
|
|
34
src/Makefile
34
src/Makefile
|
@ -1,34 +0,0 @@
|
|||
.PHONY: format lint build build-release build-docker run debug
|
||||
|
||||
build-supplemental:
|
||||
cd ./build && ./version.sh && python3 ./error_gen.py
|
||||
|
||||
build: build-supplemental
|
||||
g++ main.cpp --std=c++20 -g -o ./anthracite
|
||||
|
||||
build-release: build-supplemental
|
||||
g++ main.cpp --std=c++20 -O3 -o ./anthracite
|
||||
|
||||
build-docker:
|
||||
docker build . -t anthracite
|
||||
|
||||
run: build
|
||||
./anthracite 8080
|
||||
|
||||
run-test: build
|
||||
./anthracite 8080 ./test_www
|
||||
|
||||
debug: build
|
||||
gdb --args ./anthracite 8080
|
||||
|
||||
debug-test: build
|
||||
gdb --args ./anthracite 8080 ./test_www
|
||||
|
||||
format:
|
||||
clang-format *.cpp -i
|
||||
|
||||
lint:
|
||||
clang-tidy *.cpp
|
||||
|
||||
lint-fix:
|
||||
clang-tidy *.cpp -fix -fix-errors
|
|
@ -6,9 +6,9 @@
|
|||
#include <netinet/in.h>
|
||||
#include <sstream>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <unordered_map>
|
||||
#include <sys/time.h>
|
||||
|
||||
constexpr int MAX_QUEUE_LENGTH = 100;
|
||||
|
||||
|
|
Loading…
Reference in a new issue