prevent the server from swallowing exceptions in debug mode
So it's easier to catch them inside a debugger.
This commit is contained in:
parent
e6de69abfb
commit
7a853dc56d
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,11 @@
|
||||||
set(TARGET server)
|
set(TARGET server)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
add_executable(${TARGET} server.cpp json.hpp httplib.h)
|
add_executable(${TARGET} server.cpp json.hpp httplib.h)
|
||||||
|
target_compile_definitions(${TARGET} PRIVATE
|
||||||
|
$<$<CONFIG:Debug>:
|
||||||
|
CPPHTTPLIB_NO_EXCEPTIONS=1
|
||||||
|
>
|
||||||
|
)
|
||||||
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
|
||||||
target_compile_features(${TARGET} PRIVATE cxx_std_11)
|
target_compile_features(${TARGET} PRIVATE cxx_std_11)
|
||||||
if(TARGET BUILD_INFO)
|
if(TARGET BUILD_INFO)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue