Skip to content

Commit f85b51e

Browse files
committed
Commit resolution
1 parent 696f86c commit f85b51e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ if (MSVC)
230230
/wd4996 # Function or variable may be unsafe/deprecated
231231
)
232232
function(disable_msvc_warnings target_name)
233-
target_compile_options(${target_name} PRIVATE ${MSVC_WARNING_FLAGS})
233+
if(TARGET ${target_name})
234+
target_compile_options(${target_name} PRIVATE ${MSVC_WARNING_FLAGS})
235+
endif()
234236
endfunction()
235237

236238
if (WHISPER_BUILD_EXAMPLES)
@@ -246,4 +248,4 @@ if (MSVC)
246248
disable_msvc_warnings(whisper-bench)
247249
disable_msvc_warnings(quantize)
248250
endif()
249-
endif()
251+
endif()

0 commit comments

Comments
 (0)