os_labs/CMakeLists.txt

16 lines
405 B
CMake
Raw Normal View History

2020-04-16 15:15:52 +10:00
cmake_minimum_required(VERSION 3.16)
project(os_labs C)
set(CMAKE_C_STANDARD 11)
function(define_lab lab_name)
add_subdirectory("${lab_name}")
add_custom_target("RUN_${lab_name}" ALL
"${PROJECT_SOURCE_DIR}/scripts/run_all.sh" "${PROJECT_BINARY_DIR}/${lab_name}"
USES_TERMINAL
DEPENDS "${lab_name}"
)
message("${lab_name} defined.")
endfunction()
define_lab(lab2)