This commit is contained in:
parent
524f8d7dde
commit
37e0c938a3
@ -5,10 +5,14 @@ set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
|
||||
include(CTest)
|
||||
include(ExternalProject)
|
||||
|
||||
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)
|
||||
|
||||
ExternalProject_Add(firmware
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fw
|
||||
BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/fw
|
||||
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/riscv-toolchain.cmake
|
||||
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/riscv-toolchain.cmake -DTEST=${TEST} -DSANDBOX_ASM=${SANDBOX_ASM} -DSANDBOX_C=${SANDBOX_C}
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(firmware)
|
||||
project(firmware C ASM)
|
||||
|
||||
option(TEST "Enable test firmware compilation" ON)
|
||||
option(SANDBOX_ASM "Enable sandbox compilation using ASM language" OFF)
|
||||
|
@ -1,7 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(sandbox_asm ASM)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/utils.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/../cmake/utils.cmake)
|
||||
|
||||
set(SOURCE_FILES main.s)
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(sandbox_c C)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/utils.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/../cmake/utils.cmake)
|
||||
|
||||
set(SOURCE_FILES
|
||||
main.c
|
||||
|
Loading…
Reference in New Issue
Block a user