How to get rid of CMake warnings on homebrew and readline

How to get rid of the following two CMake warnings seen during compiling from the git source ? They seem useless or wrong warnings for macOS users, though I am not familiar with cmake configuration.

-- Configuring SWI-Prolog-8.5.2
CMake Warning at cmake/port/Darwin.cmake:10 (message):
  Could not find Macport or Homebrew to provide dependencies 		 trying to
  configure with default search paths
Call Stack (most recent call first):
  cmake/Ports.cmake:2 (include)
  CMakeLists.txt:77 (include)
-- Found Readline: /opt/homebrew/opt/readline/include  
CMake Warning at packages/readline/CMakeLists.txt:16 (message):
  Found readline at /opt/homebrew/opt/readline/include, which

  	 looks like Apple readline.  We need GNU readline.  Dropping

  	 the readline interface

Seems it gets the detection of homebrew wrong? Check out cmake/port/Darwin.cmake on what it tries. I see there it expects brew in /usr/local. Is this outdated?

I have made a google search for “homebrew default directory /opt”. According one of the pages, now homebrew installs everything under
/opt/homebrew, not under /usr/local. I am still a little bit confused about this. BTW, where is cmake/port/Darwin.cmake ? I am curious of the contents, though I am not sure I can read it. Thanks for suggestion.

% /bin/bash -c "$(curl -fsSL"
==> This script will install:
==> The following new directories will be created:
==> The Xcode Command Line Tools will be installed.

Press RETURN to continue or any other key to abort


A related google search gives me this codes, which seems related to my post. In fact, I see the warnings only when compiling on M1 Mac mini.

  /sw        # Fink
  /opt/local # MacPorts
  /opt/homebrew # Brew on Apple Silicon