@@ -30,21 +30,6 @@ target_compile_definitions(${TARGET} PRIVATE
3030 CPPHTTPLIB_TCP_NODELAY=1
3131)
3232
33- if (LLAMA_FATAL_WARNINGS)
34- # disable fatal warnings in 3rd party code
35- if (MSVC )
36- get_target_property (target_options ${TARGET} COMPILE_OPTIONS )
37- list (REMOVE_ITEM target_options "/WX" )
38- message (STATUS "Target options: ${target_options} " )
39- set_target_properties (${TARGET} PROPERTIES COMPILE_OPTIONS "${target_options} " )
40- else ()
41- get_target_property (target_options ${TARGET} COMPILE_OPTIONS )
42- string (REPLACE "-Werror;" "" target_options "${target_options} " )
43- message (STATUS "Target options: ${target_options} " )
44- set_target_properties (${TARGET} PROPERTIES COMPILE_OPTIONS "${target_options} " )
45- endif ()
46- endif ()
47-
4833set (OPENSSL_NO_ASM ON CACHE BOOL "Disable OpenSSL ASM code when building BoringSSL or LibreSSL" )
4934
5035if (LLAMA_BUILD_BORINGSSL)
@@ -163,6 +148,21 @@ elseif (LLAMA_OPENSSL)
163148 endif ()
164149endif ()
165150
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+ list (REMOVE_ITEM target_options "/WX" )
156+ message (STATUS "Target options: ${target_options} " )
157+ set_target_properties (fipsmodule PROPERTIES COMPILE_OPTIONS "${target_options} " )
158+ else ()
159+ get_target_property (target_options fipsmodule COMPILE_OPTIONS )
160+ string (REPLACE "-Werror;" "" target_options "${target_options} " )
161+ message (STATUS "Target options: ${target_options} " )
162+ set_target_properties (fipsmodule PROPERTIES COMPILE_OPTIONS "${target_options} " )
163+ endif ()
164+ endif ()
165+
166166if (CPPHTTPLIB_OPENSSL_SUPPORT)
167167 target_compile_definitions (${TARGET} PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT ) # used in server.cpp
168168 if (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
0 commit comments