RVSCC/CMakeLists.txt

20 lines
669 B
CMake
Raw Normal View History

2023-02-02 22:46:17 +00:00
cmake_minimum_required(VERSION 3.10)
2023-02-01 16:23:11 +00:00
project(rvscc)
2023-02-08 01:33:01 +00:00
set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
include(CTest)
2023-02-02 22:46:17 +00:00
include(ExternalProject)
2023-02-01 16:23:11 +00:00
2023-03-02 21:16:41 +00:00
option(TEST "Enable test firmware compilation" ON)
option(SANDBOX_ASM "Enable sandbox compilation using ASM language" OFF)
option(SANDBOX_C "Enable sandbox compilation using C language" OFF)
2023-02-02 22:46:17 +00:00
ExternalProject_Add(firmware
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fw
2023-02-09 22:51:02 +00:00
BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/fw
2023-03-02 21:16:41 +00:00
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/riscv-toolchain.cmake -DTEST=${TEST} -DSANDBOX_ASM=${SANDBOX_ASM} -DSANDBOX_C=${SANDBOX_C}
2023-02-02 22:46:17 +00:00
INSTALL_COMMAND ""
)
add_subdirectory(test)