Files
photon/tests/CMakeLists.txt

11 lines
451 B
CMake
Raw Permalink Normal View History

2020-03-31 12:55:52 +01:00
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>)
2020-04-03 19:21:22 +01:00
target_compile_options(${test_name} PRIVATE -ffreestanding -nostdlib)
2020-03-31 16:21:07 +01:00
target_include_directories(${test_name} PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/../sysroot/usr/include)
2020-03-31 12:55:52 +01:00
target_link_libraries(${test_name} c)
endforeach (test)