move CPPHTTPLIB settings inside server
Since they aren't configurable and were missing from the Makefile.
This commit is contained in:
parent
28694f7ac9
commit
429ed950af
2 changed files with 7 additions and 7 deletions
|
@ -3,13 +3,6 @@ option(LLAMA_SERVER_VERBOSE "Build verbose logging option for Server" ON)
|
|||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_executable(${TARGET} server.cpp json.hpp httplib.h)
|
||||
target_compile_definitions(${TARGET} PRIVATE
|
||||
# single thread
|
||||
CPPHTTPLIB_THREAD_POOL_COUNT=1
|
||||
# crash the server in debug mode, otherwise send an http 500 error
|
||||
$<$<CONFIG:Debug>:
|
||||
CPPHTTPLIB_NO_EXCEPTIONS=1
|
||||
>
|
||||
|
||||
SERVER_VERBOSE=$<BOOL:${LLAMA_SERVER_VERBOSE}>
|
||||
)
|
||||
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
#include "llama.h"
|
||||
#include "build-info.h"
|
||||
|
||||
// single thread
|
||||
#define CPPHTTPLIB_THREAD_POOL_COUNT 1
|
||||
#ifndef NDEBUG
|
||||
// crash the server in debug mode, otherwise send an http 500 error
|
||||
#define CPPHTTPLIB_NO_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
#include "httplib.h"
|
||||
#include "json.hpp"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue