Skip to content

Commit

Permalink
Merge pull request #14 from eshoguli/es/cmake/compilation_quick_fix
Browse files Browse the repository at this point in the history
[CPU] [RISCV64] target generation & compilation quick fix for V extention
  • Loading branch information
herumi authored Dec 13, 2024
2 parents 5b55df8 + 30b5863 commit 68f3d0e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ cmake_minimum_required(VERSION 2.6...3.0.2)

project(xbyak_riscv LANGUAGES CXX VERSION 6.68)

OPTION(XBYAK_RISCV_V "RISC-V 'V' Vector Extension support" OFF)

IF(XBYAK_RISCV_V)
ADD_DEFINITIONS(-DXBYAK_RISCV_V)
ENDIF()

message(XBYAK_RISCV_V=${XBYAK_RISCV_V})

file(GLOB headers xbyak_riscv/*.h)

if (DEFINED CMAKE_VERSION AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.2)
Expand Down
9 changes: 8 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ Install QEMU and C++ compiler for RISC-V.
sudo apt install g++-12-riscv64-linux-gnu
make -C sample
```

Generate targets:
```
cmake -DCMAKE_BUILD_TYPE=Debug -DXBYAK_RISCV_V=ON ..
```
Build:
```
make --build . --parallel 4
```

## License

Expand Down

0 comments on commit 68f3d0e

Please sign in to comment.