summaryrefslogtreecommitdiffstats
path: root/02_exercise/CMakeLists.txt
diff options
context:
space:
mode:
authorStefan Zabka <zabkaste@hu-berlin.de>2020-05-21 23:37:38 +0200
committerStefan Zabka <zabkaste@hu-berlin.de>2020-05-21 23:37:38 +0200
commitf959165cdece3c1bfae8abce834a2bb78db96190 (patch)
treec8f060d804a0c8aed5cbba2bd37a5ecb114dc21b /02_exercise/CMakeLists.txt
parent45b35365a5d0f895caeb6178f5f0a70cfe4464ee (diff)
downloadbetriebssysteme-f959165cdece3c1bfae8abce834a2bb78db96190.tar.gz
betriebssysteme-f959165cdece3c1bfae8abce834a2bb78db96190.zip
Process parse_line working
Diffstat (limited to '02_exercise/CMakeLists.txt')
-rw-r--r--02_exercise/CMakeLists.txt21
1 files changed, 17 insertions, 4 deletions
diff --git a/02_exercise/CMakeLists.txt b/02_exercise/CMakeLists.txt
index ee20a4a..ca67d1a 100644
--- a/02_exercise/CMakeLists.txt
+++ b/02_exercise/CMakeLists.txt
@@ -2,18 +2,31 @@ cmake_minimum_required(VERSION 3.5)
project(shell C)
+set(CMAKE_C_COMPILER gcc)
+set(CMAKE_C_STANDARD 11)
+set(CMAKE_C_STANDARD_REQUIRED True)
+
add_executable(prog prog.c)
add_executable(shell shell.c)
-target_link_libraries(shell PRIVATE array prompt_utils)
+target_link_libraries(shell PRIVATE array prompt_utils process)
add_compile_definitions(_GNU_SOURCE)
add_library(array array.c)
add_library(prompt_utils prompt_utils.c)
target_link_libraries(prompt_utils PRIVATE array)
-set(CMAKE_C_COMPILER gcc)
-set(CMAKE_C_STANDARD gnu11)
-set(CMAKE_C_STANDARD_REQUIRED True)
+
+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)
+
+add_executable(process_test process_test.c)
+target_link_libraries(process_test PRIVATE process)
+
+
+
set(CLANG_WARNINGS
-Wall
-Wextra # reasonable and standard