Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
49 lines (41 loc) · 1.46 KB
/
Copy pathjustfile
File metadata and controls
49 lines (41 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 2025-2026 Board of Regents of the University of Wisconsin System
# SPDX-License-Identifier: BSD-2-Clause
# Show usage
help:
@just --list
@echo
@echo 'Most dependencies are automatically downloaded, except for Boost.'
@echo '(Boost is an optional dependency used for faster random numbers.)'
@echo 'Use `apt install libboost-all-dev`, `brew install boost`, or'
@echo '`scoop install main/boost`, etc. Set `BOOST_ROOT` if necessary.'
# Configure for debug/debugoptimized/release
configure BUILDTYPE *FLAGS:
meson setup --reconfigure builddir --buildtype={{BUILDTYPE}} \
--vsenv --wrap-mode=forcefallback --default-library=static \
-Dlibhwy:contrib=disabled -Dgoogle-benchmark:tests=disabled \
{{FLAGS}}
# Configure with optional features enabled
configure-for-release *FLAGS:
@just configure release \
-Duse_boost=enabled \
-Duse_simd=enabled -Dsimd_dynamic_dispatch=enabled \
{{FLAGS}}
_configure_if_not_configured:
#!/usr/bin/env bash
set -euxo pipefail
if [ ! -d builddir ]; then
just configure release
fi
# Build
build: _configure_if_not_configured
meson compile -C builddir
# Remove build products
clean:
if [ -d builddir ]; then meson compile --clean -C builddir; fi
# Run unit tests
test: _configure_if_not_configured
meson test -C builddir
# Run benchmarks
[positional-arguments]
benchmark *FLAGS: build
./builddir/bench_SimulatedMicroscope "$@"