blob: 59efb801e2035087dbaae9362054a34781d24640 [file] [log] [blame]
cmake_minimum_required(VERSION 3.10)
project(hello_vec)
set(TARGET hello_vec)
set(ELF ${TARGET}.elf)
add_executable(${ELF} main.cpp)
target_include_directories(${ELF} PUBLIC include)
set_target_properties(${ELF} PROPERTIES LINK_DEPENDS "${LINKER_SCRIPT}")
target_link_libraries(${ELF} springbok)
set_target_properties(
${ELF}
PROPERTIES
LINK_FLAGS
"-specs=nano.specs \
-Wl,--gc-sections \
-Wl,--print-memory-usage \
-Wl,-Map=${PROJECT_NAME}.map \
-T${LINKER_SCRIPT}")
target_compile_options(${ELF} PUBLIC
-Wall
-Werror
-O3
-g3
-ggdb
-ffreestanding
-ffunction-sections
-fstack-usage
-mstrict-align)