diff --git a/CMakeLists.txt b/CMakeLists.txt index 87be383..d9ca4df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/readme.md b/readme.md index c115413..7c55c1a 100644 --- a/readme.md +++ b/readme.md @@ -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