llvm.org GIT mirror llvm / 74d260d
Fix some warnings on MSVC Differential Revision: https://reviews.llvm.org/D56329 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352322 91177308-0d34-0410-b5e6-96231b3b80d8 Alexandre Ganea 5 months ago
2 changed file(s) with 20 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1010 -Wno-unused-private-field
1111 )
1212 endif()
13
14 if(MSVC)
15 # ignore "warning LNK4199: /DELAYLOAD:shell32.dll ignored; no imports found from shell32.dll"
16 target_link_libraries(Kaleidoscope-Ch2 PRIVATE "-ignore:4199")
17 endif()
8282 # Disable all warning for AlignOfTest.cpp,
8383 # as it does things intentionally, and there is no reliable way of
8484 # disabling all warnings for all the compilers by using pragmas.
85 set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
85 # Don't disable on MSVC, because all incriminated warnings are already disabled
86 # in source; and because we would otherwise see this warning:
87 # cl : Command line warning D9025: overriding '/W4' with '/w'
88 if(NOT MSVC)
89 set_source_files_properties(AlignOfTest.cpp PROPERTIES COMPILE_FLAGS -w)
90 endif()
91 if(MSVC)
92 if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.15 )
93 # Since VS2017 15.8, the following snippet: Failed()
94 # generates a warning:
95 # \svn\llvm\utils\unittest\googlemock\include\gmock\gmock-matchers.h(186):
96 # warning C5046: 'testing::MatcherInterface::~MatcherInterface': Symbol involving type with internal linkage not defined
97 set_source_files_properties(ErrorTest.cpp PROPERTIES COMPILE_FLAGS -wd5046)
98 endif()
99 endif()
86100
87101 # ManagedStatic.cpp uses .
88102 target_link_libraries(SupportTests PRIVATE LLVMTestingSupport ${LLVM_PTHREAD_LIB})