123456789101112131415161718192021222324252627282930313233 |
- cmake_minimum_required(VERSION 3.8)
- cmake_policy(SET CMP0069 NEW)
- if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AVR")
- add_subdirectory("atmega328p")
- elseif ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Cortex-M7")
- add_subdirectory("NUCLEO-H743ZI2")
- elseif ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "MICROBLAZE")
- add_subdirectory("mb")
- elseif ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Cortex-M4")
- add_subdirectory("stm32f407g-disc1")
- elseif ("${TOOLCHAIN_PREFIX}" STREQUAL "")
- add_subdirectory("host")
- set(CMAKE_SIZE_UTIL size CACHE INTERNAL "size tool")
- endif()
- add_executable(ping-pong-throughput ping-pong-throughput.cpp)
- target_link_libraries(ping-pong-throughput board)
- add_custom_command(TARGET ping-pong-throughput
- POST_BUILD COMMAND ${CMAKE_SIZE_UTIL} ping-pong-throughput)
- if (DEFINED LINKER_SCRIPT)
- target_link_options(ping-pong-throughput PUBLIC -T ${LINKER_SCRIPT})
- endif()
|