forked from jiuyuan/InfiniTensor
build: update Makefile
Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
parent
514666591e
commit
fb3478bf3e
9
Makefile
9
Makefile
|
@ -1,10 +1,17 @@
|
||||||
.PHONY : build clean install-python test-cpp test-onnx
|
.PHONY : build clean install-python test-cpp test-onnx
|
||||||
|
|
||||||
TYPE ?= release
|
TYPE ?= release
|
||||||
|
CUDA ?= off
|
||||||
|
|
||||||
|
CMAKE_OPT = -DCMAKE_BUILD_TYPE=$(TYPE)
|
||||||
|
|
||||||
|
ifeq ($(CUDA), on)
|
||||||
|
CMAKE_OPT += -DUSE_CUDA=ON
|
||||||
|
endif
|
||||||
|
|
||||||
build:
|
build:
|
||||||
mkdir -p build/$(TYPE)
|
mkdir -p build/$(TYPE)
|
||||||
cd build/$(TYPE) && cmake -DCMAKE_BUILD_TYPE=$(TYPE) ../.. && make -j8
|
cd build/$(TYPE) && cmake $(CMAKE_OPT) ../.. && make -j8
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
Loading…
Reference in New Issue