| function(vec_cc_binary) |
| cmake_parse_arguments( |
| _RULE |
| "" |
| "NAME" |
| "SRCS;COPTS;DEFINES;LINKOPTS;DATA;DEPS;LABELS" |
| ${ARGN} |
| ) |
| |
| set(_NAME "${_RULE_NAME}") |
| project(${_RULE_NAME}) |
| set (CMAKE_CXX_STANDARD 17) |
| |
| set(_ELF_NAME "${_RULE_NAME}.elf") |
| add_executable(${_ELF_NAME}) |
| target_include_directories(${_ELF_NAME} PUBLIC include) |
| set_target_properties(${_ELF_NAME} PROPERTIES LINK_DEPENDS "${LINKER_SCRIPT}") |
| |
| target_sources(${_ELF_NAME} |
| PRIVATE |
| ${_RULE_SRCS} |
| ) |
| |
| target_link_libraries(${_ELF_NAME} |
| PUBLIC |
| ${_RULE_DEPS} |
| springbok |
| ) |
| |
| target_compile_options(${_ELF_NAME} |
| PUBLIC |
| ${VEC_DEFAULT_COPTS} |
| ${_RULE_COPTS} |
| ) |
| |
| target_link_options(${_ELF_NAME} |
| PUBLIC |
| ${_RULE_LINKOPTS} |
| ${VEC_DEFAULT_LINKOPTS} |
| -T ${LINKER_SCRIPT} |
| ) |
| endfunction() |