blob: 4b2820f61b501547a1f51a5d46325dacdf1b8946 [file] [log] [blame]
cmake_minimum_required(VERSION 3.10)
project(vector_load_tests)
set(TARGET vector_load_tests)
set(ELF ${TARGET}.elf)
add_executable(${ELF} vector_load_store_tests.c)
target_include_directories(${ELF} PUBLIC include)
set_target_properties(${ELF} PROPERTIES LINK_DEPENDS "${LINKER_SCRIPT}")
target_link_libraries(${ELF} vector_tests)
set_target_properties(
${ELF}
PROPERTIES
LINK_FLAGS
"-T${LINKER_SCRIPT} \
-specs=nano.specs \
-Wl,--gc-sections \
-Wl,--print-memory-usage \
-Wl,-Map=${PROJECT_NAME}.map")
target_compile_options(${ELF} PUBLIC
-nostdlib
-ffreestanding
-ffunction-sections
-Wall
-Werror
-std=gnu11
-O3
-g)