1
1
#
2
2
# Programmed By: Mohammed Isam Mohammed [[email protected] ]
3
- # Copyright 2016, 2017, 2018, 2019 (c)
3
+ # Copyright 2016, 2017, 2018, 2019, 2020, 2024 (c)
4
4
#
5
5
# file: CMakeLists.txt
6
6
# This file is part of the Layla Shell project.
27
27
# then open Eclipse and select File -> Import... -> General -> Existing Projects into Workspace
28
28
# and select the source directory.
29
29
30
- cmake_minimum_required (VERSION 2.6 )
30
+ cmake_minimum_required (VERSION 2.8 )
31
31
project (shell)
32
32
33
33
# we set the debug mode so that we can easily use gdb and valgrind later.
34
34
# don't forget to turn off in the release version!
35
35
36
- set (CMAKE_BUILD_TYPE Debug )
36
+ set (CMAKE_BUILD_TYPE Release )
37
37
38
38
# gcc flags (add -g if you want debugging info)
39
39
@@ -45,7 +45,8 @@ add_executable(lsh main.c wordexp.c cmdline.c helpfunc.c initsh.
45
45
jobs.c prompt.c args.c params.c sig.c
46
46
tab.c debug.c kbdevent2.c shunt.c alphalist.c
47
47
braceexp.c vars.c vi.c vi_keys.c strbuf.c
48
- popen.c functab.c strings .c terminal.c
48
+ popen.c functab.c strings .c terminal.c utf.c
49
+ heredoc.c dstring.c
49
50
scanner/lexical.c scanner/source .c
50
51
parser/node.c parser/parser.c parser/conditionals.c
51
52
parser/loops.c parser/redirect.c
@@ -69,7 +70,7 @@ add_executable(lsh main.c wordexp.c cmdline.c helpfunc.c initsh.
69
70
builtins/unset.c builtins/ver.c builtins/dump.c
70
71
builtins/test .c builtins/disown.c builtins/echo.c
71
72
builtins/let.c builtins/whence.c builtins/local.c
72
- builtins/setx.c builtins/coproc.c
73
+ builtins/setx.c builtins/coproc.c builtins/recho.c
73
74
builtins/caller.c builtins/declare.c builtins/enable.c
74
75
builtins/logout.c builtins/memusage.c builtins/dirstack.c
75
76
builtins/suspend.c builtins/hist_expand.c builtins/bugreport.c
@@ -80,7 +81,12 @@ add_executable(lsh main.c wordexp.c cmdline.c helpfunc.c initsh.
80
81
)
81
82
82
83
# librt is needed for timer_create() and timer_settime()
83
- target_link_libraries (lsh rt)
84
+
85
+ target_link_libraries (lsh rt)
86
+
87
+ if ("x${CMAKE_BUILD_TYPE} x" STREQUAL "xDebugx" )
88
+ target_compile_definitions (lsh PRIVATE __DEBUG__)
89
+ endif ()
84
90
85
91
# compile and install
86
92
0 commit comments