summaryrefslogtreecommitdiff
path: root/Modules/FindTCL.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2020-08-06 12:38:04 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2020-08-07 09:41:38 -0400
commit98844ec9db5fe4dc4e236f3852d4f3e88a4a9e76 (patch)
tree0990a65c3e2e9b4cbc6370c285290b8b1a28ca35 /Modules/FindTCL.cmake
parentd421274e3e11a0e6480358faa8a8e5cf48d7b3c2 (diff)
downloadcmake-98844ec9db5fe4dc4e236f3852d4f3e88a4a9e76.tar.gz
FPHSA: detect inclusion between find modules
Various find modules include each other to delegate finding some subset or variant of the package. Ideally, these would use `find_dependency` or some other actual `find_package` mechanism, but that is a larger change. Instead, just detect inclusion and suppress FPHSA name mismatch warnings. Fixes: #21060
Diffstat (limited to 'Modules/FindTCL.cmake')
-rw-r--r--Modules/FindTCL.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index 960265f9f5..9b771dcd7a 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -223,6 +223,12 @@ find_path(TK_INCLUDE_PATH
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+if (CMAKE_FIND_PACKAGE_NAME STREQUAL "TclStub")
+ # FindTclStub include()'s this module. It's an old pattern, but rather than
+ # trying to suppress this from outside the module (which is then sensitive to
+ # the contents, detect the case in this module and suppress it explicitly.
+ set(FPHSA_NAME_MISMATCHED 1)
+endif ()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)
set(FPHSA_NAME_MISMATCHED 1)
set(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})