-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
26 lines (20 loc) · 752 Bytes
/
build.sh
File metadata and controls
26 lines (20 loc) · 752 Bytes
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
#!/bin/bash
_target=${1:-'all'}
rm -rf build
mkdir build
_workspaceFolder=$(pwd)
cd build
# For non-conda users:
cmake .. -Wno-dev -G Ninja \
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ \
-DMLIR_DIR=${_workspaceFolder}/third_party/llvm/lib/cmake/mlir \
-DLLVM_DIR=${_workspaceFolder}/third_party/llvm/lib/cmake/llvm \
-DCMAKE_MODULE_PATH="${_workspaceFolder}/third_party/llvm/lib/cmake/mlir;${_workspaceFolder}/third_party/llvm/lib/cmake/llvm" \
-DMLIR_TABLEGEN_EXE=${_workspaceFolder}/third_party/llvm/bin/mlir-tblgen
# ninja
cmake \
--build ${_workspaceFolder}/build \
--config Debug --target ${_target}