opencv/platforms/linux/riscv64-gcc.toolchain.cmake
Alexander Alekhin 941d89e06d cmake: fix RISC-V toolchains
- RVV options are moved to configuration scripts instead of toolchains
2022-12-09 12:02:28 +00:00

11 lines
351 B
CMake

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(GNU_MACHINE riscv64-unknown-linux-gnu CACHE STRING "GNU compiler triple")
if(NOT DEFINED CMAKE_CXX_FLAGS) # guards toolchain multiple calls
set(CMAKE_C_FLAGS "-march=rv64gc")
set(CMAKE_CXX_FLAGS "-march=rv64gc")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/riscv-gnu.toolchain.cmake")