Implemented runtime files and tests
This commit is contained in:
8
tests/CMakeLists.txt
Normal file
8
tests/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
file(GLOB test_sources ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
|
||||
foreach (test ${test_sources})
|
||||
get_filename_component(test_name ${test} NAME_WE)
|
||||
add_executable(${test_name} ${test} $<TARGET_OBJECTS:crt>)
|
||||
target_compile_options(${test_name} PRIVATE -ffreestanding -nostdlib -nostdinc)
|
||||
target_link_libraries(${test_name} c)
|
||||
endforeach (test)
|
||||
4
tests/start.c
Normal file
4
tests/start.c
Normal file
@@ -0,0 +1,4 @@
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
Reference in New Issue
Block a user