File tree Expand file tree Collapse file tree 3 files changed +174
-332
lines changed
Expand file tree Collapse file tree 3 files changed +174
-332
lines changed Original file line number Diff line number Diff line change 1-
2-
31cmake_minimum_required (VERSION 3.12)
42project ("tortoise" )
53
6-
74set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
85
9- add_executable (tortoise main.cpp common.cpp)
6+ option (DEBUG "Debug mode" OFF )
7+ option (GGML_CUDA "cuda mode" OFF )
108
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 ()
1216
13- if (GGML_CUBLAS )
14- add_definitions (-DGGML_USE_CUBLAS )
17+ if (GGML_CUDA )
18+ add_definitions (-DGGML_USE_CUDA )
1519endif ()
1620
1721if (GGML_METAL)
@@ -20,7 +24,7 @@ if (GGML_METAL)
2024endif ()
2125
2226add_subdirectory (ggml)
23-
27+ add_executable (tortoise main.cpp common.cpp)
2428target_link_libraries (tortoise PUBLIC ggml)
2529target_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