ChCore-exercise/lab5/user/lab3/CMakeLists.txt
2021-05-23 22:24:02 +08:00

30 lines
563 B
CMake

cmake_minimum_required(VERSION 3.11)
set(TEST_LAB3_BINS
"badinsn"
"badinsn2"
"hello"
"testputc"
"testcreatepmo"
"testmappmo"
"testmappmoerr"
"testsbrk"
"faultread"
"faultwrite"
"testpf"
)
foreach(bin ${TEST_LAB3_BINS})
file(GLOB ${bin}_source_files "${bin}.c")
add_executable(${bin}.bin ${${bin}_source_files})
target_link_libraries(${bin}.bin chcore-user-lib)
set_property(
TARGET ${bin}.bin
APPEND_STRING
PROPERTY
LINK_FLAGS
"-e START"
)
endforeach(bin)