From 2dfb4e933a3c3d66670b506b5f6aca55266df6e5 Mon Sep 17 00:00:00 2001 From: Stefan Zabka Date: Sun, 24 May 2020 21:10:30 +0200 Subject: Intial split --- 02_exercise/CMakeLists.txt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to '02_exercise/CMakeLists.txt') diff --git a/02_exercise/CMakeLists.txt b/02_exercise/CMakeLists.txt index 9cae089..e47f0ee 100644 --- a/02_exercise/CMakeLists.txt +++ b/02_exercise/CMakeLists.txt @@ -5,30 +5,38 @@ project(shell C) set(CMAKE_C_COMPILER gcc) set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED True) +add_compile_definitions(_GNU_SOURCE) + find_package(Sanitizers) add_executable(prog prog.c) -add_executable(shell shell.c) -target_link_libraries(shell PRIVATE array prompt_utils process) +add_executable(shell shell.c) +target_link_libraries(shell PRIVATE array prompt_utils process builtin) +target_compile_options(shell INTERFACE ${PROJECT_WARNINGS}) add_sanitizers(shell) -add_compile_definitions(_GNU_SOURCE) + +add_library(builtin builtins.c) +target_compile_options(builtin INTERFACE ${PROJECT_WARNINGS}) add_library(array array.c) + add_library(prompt_utils prompt_utils.c) target_link_libraries(prompt_utils PRIVATE array) +target_compile_options(prompt_utils INTERFACE ${PROJECT_WARNINGS}) add_executable(prompt_utils_test prompt_utils_test.c) target_link_libraries(prompt_utils_test PRIVATE prompt_utils array) + add_library(process process.c) target_link_libraries(process PRIVATE array) +target_compile_options(process INTERFACE ${PROJECT_WARNINGS}) add_executable(process_test process_test.c) target_link_libraries(process_test PRIVATE process) -target_compile_options(shell INTERFACE ${PROJECT_WARNINGS}) -target_compile_options(prompt_utils INTERFACE ${PROJECT_WARNINGS}) -target_compile_options(process INTERFACE ${PROJECT_WARNINGS}) + + -- cgit v1.2.3-54-g00ecf