refactor: use cmake macros to do objcopy, install and tests
All checks were successful
All checks were successful
This commit is contained in:
parent
f6c3a13e7f
commit
8630fe7667
12 changed files with 64 additions and 54 deletions
|
@ -16,9 +16,5 @@ add_executable(am-tests
|
|||
target_include_directories(am-tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
target_link_libraries(am-tests PRIVATE am-${ARCH} klib)
|
||||
|
||||
# -- Extract binary file from ELF
|
||||
add_custom_command(TARGET am-tests
|
||||
COMMAND ${CMAKE_OBJCOPY} ARGS -S --set-section-flags .bss=alloc,contents -O binary am-tests am-tests.bin)
|
||||
|
||||
install(TARGETS am-tests RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/am-kernels)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/am-tests.bin DESTINATION ${CMAKE_INSTALL_DATADIR}/am-kernels)
|
||||
create_binary(am-tests)
|
||||
install_target_and_binary(am-tests)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue