blob: 5f2c4bb274f50b8c2d9b5f8b73b232ea0b4d78f4 [file] [log] [blame]
cmake_minimum_required (VERSION 3.10)
set(CMAKE_C_ABI_COMPILED ON)
set(CMAKE_CXX_ABI_COMPILED ON)
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/riscv_baremetal.cmake")
list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/cmake/
)
project(springbok_project)
enable_language(ASM)
include($ENV{ROOTDIR}/sw/pigweed/pw_build/pigweed.cmake)
pw_set_backend(pw_log pw_log_basic)
pw_set_backend(pw_assert pw_assert_log)
pw_set_backend(pw_sys_io pw_sys_io_stdio)
add_subdirectory($ENV{ROOTDIR}/sw/pigweed pw)
set(LINKER_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/springbok/matcha.ld" CACHE PATH "Linker script for springbok")
set(TEST_RUNNER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/scripts/test_runner.py)
file(COPY ${TEST_RUNNER_SRC}
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
include(vec_cc_binary)
include(vec_cc_test)
include(vec_cc_generated_test)
add_subdirectory(springbok)
add_subdirectory(hello_vec)
add_subdirectory(vector_tests)
add_subdirectory(vector_load_store_tests)
add_subdirectory(vector_vadd_vsub_tests)
add_subdirectory(vector_executive)
add_subdirectory(vector_vset_tests)
add_subdirectory(pw_unit_test_demo)
enable_testing()
add_subdirectory(softrvv)
add_subdirectory(tests)
add_custom_target(AllTests
COMMAND
"${CMAKE_CTEST_COMMAND}"
--verbose
--build-and-test "${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}"
--build-generator "${CMAKE_GENERATOR}"
--test-command "${CMAKE_CTEST_COMMAND}"
)