blob: 3bfaee02043fc9e905cea5ba799e356785715e35 [file] [log] [blame]
cmake_minimum_required(VERSION 3.10)
project(pw_unit_test_demo)
set (CMAKE_CXX_STANDARD 17)
set(TARGET pw_unit_test_demo)
set(ELF ${TARGET}.elf)
add_executable(${ELF} ${TARGET}.cpp)
target_include_directories(${ELF} PUBLIC include)
set_target_properties(${ELF} PROPERTIES LINK_DEPENDS "${LINKER_SCRIPT}")
target_link_libraries(${ELF} springbok)
target_link_libraries(${ELF} pw_unit_test)
target_link_libraries(${ELF} pw_unit_test.main)
target_link_libraries(${ELF} pw_assert_basic)
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} \
-Xlinker --defsym=__itcm_length__=256K")
target_compile_options(${ELF} PUBLIC
-Wall
-Werror
-O3
-g3
-ggdb
-ffreestanding
-ffunction-sections
-fstack-usage
-mstrict-align)