build: init cmake build system for am
This commit is contained in:
parent
18db852763
commit
da0c42422d
22 changed files with 515 additions and 30 deletions
17
abstract-machine/klib/tests/CMakeLists.txt
Normal file
17
abstract-machine/klib/tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
set(TEST_SOURCES
|
||||
stdio
|
||||
string
|
||||
)
|
||||
|
||||
foreach(TEST IN LISTS TEST_SOURCES)
|
||||
add_executable(${TEST} ${TEST}.c)
|
||||
target_link_libraries(${TEST} am-${ARCH} klib m)
|
||||
target_include_directories(${TEST}
|
||||
PRIVATE $<TARGET_PROPERTY:am_interface,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
PRIVATE $<TARGET_PROPERTY:klib_interface,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
# TODO: Run tests in other configurations
|
||||
if(__PLATFORM_NATIVE__)
|
||||
add_test(NAME ${TEST} COMMAND ${TEST})
|
||||
endif()
|
||||
endforeach()
|
Loading…
Add table
Add a link
Reference in a new issue