Skip to content

Commit 9b0c774

Browse files
committed
fix(justfile): stop rebuilding buildfiles each run
1 parent 587ce52 commit 9b0c774

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

justfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ dev:
44

55
# Configure the project with CMake
66
configure:
7-
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COLOR_DIAGNOSTICS=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5
7+
cmake -S . -B build -G Ninja \
8+
-DCMAKE_BUILD_TYPE=Debug \
9+
-DCMAKE_COLOR_DIAGNOSTICS=ON \
10+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
811

912
# Build the project using Ninja
10-
build: configure
13+
build:
14+
#!/usr/bin/env bash
15+
if [[ ! -f build/build.ninja || CMakeLists.txt -nt build/build.ninja ]]; then
16+
echo "Configuring..."
17+
just configure
18+
fi
1119
cmake --build build -- -j$(nproc)
1220
1321
# Runs the game using the dedicated Nvidia/AMD GPU with optional config
1422
[default]
15-
run config="": build
23+
run config="":
1624
#!/usr/bin/env bash
1725
if command -v nvidia-smi > /dev/null 2>&1; then
1826
export DRI_PRIME=1

0 commit comments

Comments
 (0)