[PATCH] D84554: Use INTERFACE_COMPILE_OPTIONS to disable -Wsuggest-override for any target that links to gtest

Logan Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 13:23:49 PDT 2020


logan-5 created this revision.
logan-5 added a reviewer: labath.
Herald added subscribers: llvm-commits, cfe-commits, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini, usaxena95, kadircet, arphaman, jkorous, hiraditya, mgorny.
Herald added a reviewer: bollu.
Herald added a reviewer: DavidTruby.
Herald added projects: clang, MLIR, LLVM.

This cleans up several CMakeLists.txt's where `-Wno-suggest-override` was manually specified. These test targets now inherit this flag from the gtest target.

Some unittests CMakeLists.txt's, in particular Flang and LLDB, are not touched by this patch. Flang manually adds the gtest sources itself in some configurations, rather than linking to LLVM's gtest target, so this fix would be insufficient to cover those cases. Similarly, LLDB has subdirectories that manually add the gtest headers to their include path without linking to the gtest target, so those subdirectories still need -Wno-suggest-override to be manually specified to compile without warnings.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84554

Files:
  clang-tools-extra/clangd/unittests/CMakeLists.txt
  clang-tools-extra/unittests/CMakeLists.txt
  clang/unittests/CMakeLists.txt
  lld/unittests/CMakeLists.txt
  llvm/lib/Testing/Support/CMakeLists.txt
  llvm/unittests/CMakeLists.txt
  llvm/utils/unittest/CMakeLists.txt
  mlir/unittests/CMakeLists.txt
  polly/unittests/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84554.280564.patch
Type: text/x-patch
Size: 4872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200724/f48859d5/attachment.bin>


More information about the llvm-commits mailing list