Skip to content

Commit ad70fa1

Browse files
committed
Added possibility to specify cmake build folder
This is useful to compile all tests for different tile sizes and then run all the tests to be able to run them in parallel.
1 parent 6b4025f commit ad70fa1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
SHELL := /bin/bash
2222

23+
CMAKE_BUILDDIR ?= build
2324
BUILD_DIR ?= ../sw/tests/$(test)
2425
MAGIA_DIR ?= ../
2526
GVSOC_DIR ?= ./gvsoc
@@ -39,7 +40,7 @@ tiles_2 := $(shell echo $$(( $(tiles) * $(tiles) )))
3940
tiles_log := $(shell awk 'BEGIN { printf "%.0f", log($(tiles_2))/log(2) }')
4041
tiles_log_real := $(shell awk 'BEGIN { printf "%.0f", log($(tiles))/log(2) }')
4142

42-
.PHONY: gvsoc
43+
.PHONY: gvsoc build
4344

4445
clean:
4546
rm -rf build/
@@ -66,8 +67,8 @@ ifeq ($(compiler), GCC_MULTILIB)
6667
sed -i -E 's/^#add_subdirectory\(flatatt\)/add_subdirectory\(flatatt\)/' ./tests/magia/mesh/CMakeLists.txt
6768
sed -i -E 's/^\/\/#include "utils\/attention_utils.h"/#include "utils\/attention_utils.h"/' ./targets/magia/include/tile.h
6869
endif
69-
cmake -DTARGET_PLATFORM=$(target_platform) -DEVAL=$(eval) -DCOMPILER=$(compiler) -B build --trace-expand
70-
cmake --build build --verbose
70+
cmake -DTARGET_PLATFORM=$(target_platform) -DEVAL=$(eval) -DCOMPILER=$(compiler) -B $(CMAKE_BUILDDIR) --trace-expand
71+
cmake --build $(CMAKE_BUILDDIR) --verbose
7172

7273
set_mesh:
7374
ifeq ($(tiles), 1)

0 commit comments

Comments
 (0)