File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ project(chatglm-mnn)
44set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
55
66option (BUILD_FOR_ANDROID "Build for android whith mini memory mode." OFF )
7+ option (BUILD_MINI_MEM_MODE "Build whith mini memory mode." OFF )
78
89# include dir
910include_directories (${CMAKE_CURRENT_LIST_DIR} /include /)
@@ -37,10 +38,13 @@ if (BUILD_FOR_ANDROID)
3738 add_executable (cli_demo ${CMAKE_CURRENT_LIST_DIR} /demo/cli_demo.cpp)
3839 target_link_libraries (cli_demo chat log )
3940else ()
41+ if (BUILD_MINI_MEM_MODE)
42+ target_compile_options (chat PRIVATE -DMINI_MEM_MODE)
43+ endif ()
4044 # cli demo
4145 add_executable (cli_demo ${CMAKE_CURRENT_LIST_DIR} /demo/cli_demo.cpp)
4246 target_link_libraries (cli_demo chat)
4347 # web demo
4448 add_executable (web_demo ${CMAKE_CURRENT_LIST_DIR} /demo/web_demo.cpp)
4549 target_link_libraries (web_demo chat pthread)
46- endif ()
50+ endif ()
You can’t perform that action at this time.
0 commit comments