Skip to content

Commit 308a127

Browse files
committed
[llvm][unittest] Add -Wno-suggest-override to more infrastructure that includes googletest/googlemock headers
1 parent 787eb0c commit 308a127

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

llvm/lib/Testing/Support/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ add_llvm_library(LLVMTestingSupport
1515
Support
1616
)
1717

18+
if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
19+
add_definitions("-Wno-suggest-override")
20+
endif()
21+
1822
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
1923
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
2024
target_link_libraries(LLVMTestingSupport PRIVATE gtest)

llvm/unittests/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ function(add_llvm_target_unittest test_dir_name)
1414
add_llvm_unittest(${test_dir_name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
1515
endfunction()
1616

17+
if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
18+
add_definitions("-Wno-suggest-override")
19+
endif()
20+
1721
add_subdirectory(ADT)
1822
add_subdirectory(Analysis)
1923
add_subdirectory(AsmParser)

0 commit comments

Comments
 (0)