Skip to content

Commit 3b3aa1c

Browse files
authored
test
1 parent 7ae6bff commit 3b3aa1c

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

vendor/cpp-httplib/CMakeLists.txt

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ find_package(Threads REQUIRED)
66
llama_add_compile_flags()
77

88
add_library(${TARGET} STATIC httplib.cpp httplib.h)
9-
if (NOT MSVC)
10-
# 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()
1114
target_compile_options(${TARGET} PRIVATE -w)
1215
endif()
1316

@@ -148,16 +151,20 @@ elseif (LLAMA_OPENSSL)
148151
endif()
149152
endif()
150153

151-
if(LLAMA_BUILD_BORINGSSL AND LLAMA_FATAL_WARNINGS)
152-
# disable fatal warnings in 3rd party code
153-
if (MSVC)
154-
get_target_property(target_options fipsmodule COMPILE_OPTIONS)
155-
message(STATUS "Target options: ${target_options}")
156-
target_compile_options(crypto PRIVATE /WX-)
157-
target_compile_options(fipsmodule PRIVATE /WX-)
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()
158162
else()
163+
target_compile_options(ssl PRIVATE -w)
159164
target_compile_options(crypto PRIVATE -w)
160-
target_compile_options(fipsmodule PRIVATE -w)
165+
if(LLAMA_BUILD_BORINGSSL)
166+
target_compile_options(fipsmodule PRIVATE -w)
167+
endif()
161168
endif()
162169
endif()
163170

0 commit comments

Comments
 (0)