@@ -3,9 +3,14 @@ license_add_file("cpp-httplib" "LICENSE")
33
44find_package (Threads REQUIRED )
55
6+ llama_add_compile_flags ()
7+
68add_library (${TARGET} STATIC httplib.cpp httplib.h )
7- if (NOT MSVC )
8- # disable warnings in 3rd party code
9+
10+ # disable warnings in 3rd party code
11+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
12+ target_compile_options (${TARGET} PRIVATE /w )
13+ else ()
914 target_compile_options (${TARGET} PRIVATE -w )
1015endif ()
1116
@@ -146,6 +151,23 @@ elseif (LLAMA_OPENSSL)
146151 endif ()
147152endif ()
148153
154+ # disable warnings in 3rd party code
155+ if (LLAMA_BUILD_BORINGSSL OR LLAMA_BUILD_LIBRESSL)
156+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
157+ target_compile_options (ssl PRIVATE /w )
158+ target_compile_options (crypto PRIVATE /w )
159+ if (LLAMA_BUILD_BORINGSSL)
160+ target_compile_options (fipsmodule PRIVATE /w )
161+ endif ()
162+ else ()
163+ target_compile_options (ssl PRIVATE -w )
164+ target_compile_options (crypto PRIVATE -w )
165+ if (LLAMA_BUILD_BORINGSSL)
166+ target_compile_options (fipsmodule PRIVATE -w )
167+ endif ()
168+ endif ()
169+ endif ()
170+
149171if (CPPHTTPLIB_OPENSSL_SUPPORT)
150172 target_compile_definitions (${TARGET} PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT ) # used in server.cpp
151173 if (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
0 commit comments