function(vec_cc_test)
  cmake_parse_arguments(
    _RULE
    ""
    "NAME"
    "SRCS;COPTS;DEFINES;LINKOPTS;DATA;DEPS;LABELS;TIMEOUT"
    ${ARGN}
  )

set(_NAME "${_RULE_NAME}")
project(${_RULE_NAME})
set (CMAKE_CXX_STANDARD 17)

vec_cc_binary(
  NAME
    ${_RULE_NAME}
  SRCS
    ${_RULE_SRCS}
  DEPS
      pw_unit_test
      pw_unit_test.main
      pw_assert_basic
      test_v_helpers
      softrvv
      ${_RULE_DEPS}
  LINKOPTS
    ${_RULE_LINKOPTS}
)

if("${_RULE_TIMEOUT}" STREQUAL "")
  set(_TIMEOUT 30)
else()
  set(_TIMEOUT ${_RULE_TIMEOUT})
endif()

if(DEFINED TEST_RUNNER)
  find_program(QEMU_RV32 qemu-system-riscv32 HINTS $ENV{OUT}/host/qemu)
  if(QEMU_RV32)
    add_test(
      NAME
        "qemu_${_RULE_NAME}"
      COMMAND
        ${TEST_RUNNER} qemu $<TARGET_FILE:${_RULE_NAME}.elf> --qemu-path ${QEMU_RV32} --timeout=${_TIMEOUT}
    )
    set_tests_properties("qemu_${_RULE_NAME}" PROPERTIES TIMEOUT ${_TIMEOUT})
  else()
    message(WARNING "qemu-system-riscv32 doesn't exist. Make sure you build qemu first and start a clean build to enable the qemu test")
  endif()
  find_program(RENODE_BIN renode HINTS $ENV{CACHE}/renode)
  if(RENODE_BIN)
    add_test(
      NAME
        "renode_${_RULE_NAME}"
      COMMAND
        ${TEST_RUNNER} renode $<TARGET_FILE:${_RULE_NAME}.elf> --renode-path ${RENODE_BIN} --quick_test --timeout=${_TIMEOUT}
    )
    set_tests_properties("renode_${_RULE_NAME}" PROPERTIES TIMEOUT ${_TIMEOUT})
  else()
    message(WARNING "renode doesn't exist. Make sure you build renode first and start a clean build to enable the renode test")
  endif()
endif(DEFINED TEST_RUNNER)
endfunction()
