File tree 3 files changed +174
-332
lines changed
3 files changed +174
-332
lines changed Original file line number Diff line number Diff line change 1
-
2
-
3
1
cmake_minimum_required (VERSION 3.12)
4
2
project ("tortoise" )
5
3
6
-
7
4
set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
8
5
9
- add_executable (tortoise main.cpp common.cpp)
6
+ option (DEBUG "Debug mode" OFF )
7
+ option (GGML_CUDA "cuda mode" OFF )
10
8
11
- option (GGML_CUBLAS "cuda mode" OFF )
9
+ if (DEBUG)
10
+ set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3 -O0" )
11
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -O0" )
12
+ set ( CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -g3 -O0" )
13
+ set ( CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -g3 -O0" )
14
+ set (GGML_DEBUG ON CACHE BOOL "Debug mode" )
15
+ endif ()
12
16
13
- if (GGML_CUBLAS )
14
- add_definitions (-DGGML_USE_CUBLAS )
17
+ if (GGML_CUDA )
18
+ add_definitions (-DGGML_USE_CUDA )
15
19
endif ()
16
20
17
21
if (GGML_METAL)
@@ -20,7 +24,7 @@ if (GGML_METAL)
20
24
endif ()
21
25
22
26
add_subdirectory (ggml)
23
-
27
+ add_executable (tortoise main.cpp common.cpp)
24
28
target_link_libraries (tortoise PUBLIC ggml)
25
29
target_include_directories (tortoise PUBLIC . )
26
- target_compile_features (tortoise PUBLIC cxx_std_11)
30
+ target_compile_features (tortoise PUBLIC cxx_std_11)
You can’t perform that action at this time.
0 commit comments