17 lines
406 B
Bash
Executable File
17 lines
406 B
Bash
Executable File
#!/bin/bash
|
|
rm -f build/main
|
|
|
|
docker run --rm -v $(pwd):/app -w /app \
|
|
-e CCACHE_DIR=/app/.ccache \
|
|
-e CC="ccache gcc" \
|
|
-e CXX="ccache g++" \
|
|
-e LD=mold \
|
|
-e CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) \
|
|
-e NINJA_STATUS="[%f/%t] " \
|
|
cpp-httplib-builder:latest \
|
|
-c "mkdir -p build && cd build && cmake -G Ninja .. && ninja -j$(nproc)"
|
|
|
|
if [ -f build/main ]; then
|
|
build/main
|
|
fi
|