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 https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Password:
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
==> The following new directories will be created:
/opt/homebrew/bin
/opt/homebrew/etc
/opt/homebrew/include
/opt/homebrew/lib
/opt/homebrew/sbin
/opt/homebrew/share
/opt/homebrew/var
/opt/homebrew/opt
/opt/homebrew/share/zsh
/opt/homebrew/share/zsh/site-functions
/opt/homebrew/var/homebrew
/opt/homebrew/var/homebrew/linked
/opt/homebrew/Cellar
/opt/homebrew/Caskroom
/opt/homebrew/Frameworks
==> The Xcode Command Line Tools will be installed.
Press RETURN to continue or any other key to abort
・
・
・
EDIT
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.
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
/sw # Fink
/opt/local # MacPorts
/opt/homebrew # Brew on Apple Silicon
)