This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ if(DEBUG)
4141 add_compile_definitions (ALLOW_ALL_CORS)
4242endif ()
4343
44+ if (NOT DEFINED NITRO_VERSION)
45+ set (NITRO_VERSION "default_version" )
46+ endif ()
47+
48+ add_compile_definitions (NITRO_VERSION="${NITRO_VERSION} " )
49+
4450add_subdirectory (llama.cpp)
4551add_executable (${PROJECT_NAME} main.cc)
4652
@@ -71,11 +77,10 @@ aux_source_directory(controllers CTL_SRC)
7177# aux_source_directory(filters FILTER_SRC) aux_source_directory(plugins
7278# PLUGIN_SRC) aux_source_directory(models MODEL_SRC)
7379
74- #drogon_create_views(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/views
75- # ${CMAKE_CURRENT_BINARY_DIR})
76- # use the following line to create views with namespaces.
7780# drogon_create_views(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/views
78- # ${CMAKE_CURRENT_BINARY_DIR} TRUE)
81+ # ${CMAKE_CURRENT_BINARY_DIR}) use the following line to create views with
82+ # namespaces. drogon_create_views(${PROJECT_NAME}
83+ # ${CMAKE_CURRENT_SOURCE_DIR}/views ${CMAKE_CURRENT_BINARY_DIR} TRUE)
7984
8085target_include_directories (${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
8186# ${CMAKE_CURRENT_SOURCE_DIR}/models)
Original file line number Diff line number Diff line change 33#include < drogon/HttpAppFramework.h>
44#include < drogon/drogon.h>
55#include < iostream>
6- #include < algorithm>
76
87#if defined(__APPLE__) && defined(__MACH__)
98#include < libgen.h> // for dirname()
@@ -41,6 +40,11 @@ int main(int argc, char *argv[]) {
4140 int logical_cores = std::thread::hardware_concurrency ();
4241 int drogon_thread_num = std::max (thread_num, logical_cores);
4342 nitro_utils::nitro_logo ();
43+ #ifdef NITRO_VERSION
44+ LOG_INFO << " Nitro version: " << NITRO_VERSION;
45+ #else
46+ LOG_INFO << " Nitro version: undefined" ;
47+ #endif
4448 LOG_INFO << " Server started, listening at: " << host << " :" << port;
4549 LOG_INFO << " Please load your model" ;
4650 drogon::app ().addListener (host, port);
You can’t perform that action at this time.
0 commit comments