[llvm] 308a127 - [llvm][unittest] Add -Wno-suggest-override to more infrastructure that includes googletest/googlemock headers

Logan Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 13:59:51 PDT 2020


Author: Logan Smith
Date: 2020-07-20T13:59:39-07:00
New Revision: 308a127a38d1111f3940420b98ff45fc1c17715f

URL: https://github.com/llvm/llvm-project/commit/308a127a38d1111f3940420b98ff45fc1c17715f
DIFF: https://github.com/llvm/llvm-project/commit/308a127a38d1111f3940420b98ff45fc1c17715f.diff

LOG: [llvm][unittest] Add -Wno-suggest-override to more infrastructure that includes googletest/googlemock headers

Added: 
    

Modified: 
    llvm/lib/Testing/Support/CMakeLists.txt
    llvm/unittests/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Testing/Support/CMakeLists.txt b/llvm/lib/Testing/Support/CMakeLists.txt
index fe460aeefc91..4d2f46e9b79d 100644
--- a/llvm/lib/Testing/Support/CMakeLists.txt
+++ b/llvm/lib/Testing/Support/CMakeLists.txt
@@ -15,6 +15,10 @@ add_llvm_library(LLVMTestingSupport
   Support
   )
 
+if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
+  add_definitions("-Wno-suggest-override")
+endif()
+
 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
 target_link_libraries(LLVMTestingSupport PRIVATE gtest)

diff  --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt
index d7dbaeaa32fe..c1e02313d044 100644
--- a/llvm/unittests/CMakeLists.txt
+++ b/llvm/unittests/CMakeLists.txt
@@ -14,6 +14,10 @@ function(add_llvm_target_unittest test_dir_name)
   add_llvm_unittest(${test_dir_name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
 endfunction()
 
+if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
+  add_definitions("-Wno-suggest-override")
+endif()
+
 add_subdirectory(ADT)
 add_subdirectory(Analysis)
 add_subdirectory(AsmParser)


        


More information about the llvm-commits mailing list