From 30b58637257dfc27c49d5c2d49c27facf4ed5d81 Mon Sep 17 00:00:00 2001 From: Edward Shogulin Date: Mon, 13 May 2024 16:39:11 +0100 Subject: [PATCH] target generation & compilation quick fix --- CMakeLists.txt | 8 ++++++++ readme.md | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) 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