File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,15 @@ add_compile_options(
144144 $<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
145145 $<$<COMPILE_LANGUAGE:CXX>:-funwind-tables>)
146146
147+ # LNK4049: symbol 'symbol' defined in 'filename.obj' is imported
148+ # LNK4286: symbol 'symbol' defined in 'filename_1.obj' is imported by 'filename_2.obj'
149+ # LNK4217: symbol 'symbol' defined in 'filename_1.obj' is imported by 'filename_2.obj' in function 'function'
150+ #
151+ # We cannot selectively filter the linker warnings as we do not use the MSVC
152+ # frontned and `clang-cl` (and `clang`) currently do not support `/WX:nnnn`. As
153+ # a compromise, treat all linker warnings as errors.
154+ add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
155+
147156add_compile_options (
148157 "$<$<COMPILE_LANGUAGE:Swift>:SHELL:-library-level api>"
149158 "$<$<COMPILE_LANGUAGE:Swift>:SHELL:-runtime-compatibility-version none>"
You can’t perform that action at this time.
0 commit comments