extends build system to propagate more settings

This commit is contained in:
Eyck Jentzsch 2023-08-20 16:45:54 +02:00
parent 9dd7dcb4ce
commit 3217871752

View File

@ -1,15 +1,18 @@
if (NOT DEFINED TARGET) if (NOT DEFINED BOARD)
set(TARGET iss) set(BOARD iss)
endif()
if (NOT DEFINED ISA)
set(ISA imc)
endif() endif()
add_custom_target(fw-hello-world ALL add_custom_target(fw-hello-world ALL
COMMAND make -C ${riscvfw_SOURCE_DIR}/hello-world BOARD=${TARGET} COMMAND make -C ${riscvfw_SOURCE_DIR}/hello-world BOARD=${BOARD} ISA=${ISA}
USES_TERMINAL USES_TERMINAL
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_target(fw-dhrystone ALL add_custom_target(fw-dhrystone ALL
COMMAND make -C ${riscvfw_SOURCE_DIR}/benchmarks/dhrystone BOARD=${TARGET} COMMAND make -C ${riscvfw_SOURCE_DIR}/benchmarks/dhrystone BOARD=${TARGET} ISA=${ISA}
USES_TERMINAL USES_TERMINAL
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_target(fw-coremark ALL add_custom_target(fw-coremark ALL
COMMAND make -C ${riscvfw_SOURCE_DIR}/benchmarks/coremark/cm PORT_DIR=../tgc BOARD=${TARGET} COMMAND make -C ${riscvfw_SOURCE_DIR}/benchmarks/coremark/cm PORT_DIR=../tgc BOARD=${TARGET} ISA=${ISA}
USES_TERMINAL USES_TERMINAL
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})