Re: git: 9b5005a44fdb - main - devel/cmake-core: Remove FindBoost module

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 29 Sep 2025 03:16:01 UTC
Yuri Victorovich <yuri_at_FreeBSD.org> wrote on
Date: Sun, 28 Sep 2025 02:14:19 UTC :

> The branch main has been updated by yuri:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=9b5005a44fdbe85db87d9b244ca79e50d68f6bcd
> 
> commit 9b5005a44fdbe85db87d9b244ca79e50d68f6bcd
> Author: Yuri Victorovich <yuri@FreeBSD.org>
> AuthorDate: 2025-09-28 02:12:19 +0000
> Commit: Yuri Victorovich <yuri@FreeBSD.org>
> CommitDate: 2025-09-28 02:14:17 +0000
> 
> devel/cmake-core: Remove FindBoost module
> 
> It breaks many other ports, for example multimedia/lms, math/curv, science/votca
> 
> cmake doesn't support Boost any more and doesn't know about
> the latest boost versions.

This note is just about my finding the above wording
confusing/misleading when I look up what cmake is
doing for boost. It is not about the detailed path
forward for updating ports or about other bugs that
might interfere.

It seems (see later supporting material):

) Boost now supports cmake explicitly via providing
  a BoostConfig.cmake in boost itself for make to
  use.

) Boost has been updated in 3.30 and later to be
  based on using that BoostConfig.cmake .

In other words: cmake does know about the latest
boost versions and what they provide for using
cmake. Boost is taking responsibility for tracking
its own changes for cmake use ( via updating
BoostConfig.cmake in boost itself ).


Supporting detail that I expect leads to the above
conclusions:


https://gitlab.kitware.com/cmake/cmake/-/issues/27258#note_1707621

QUOTE of Brad King's note:
These days Boost provides a proper CMake package via
BoostConfig.cmake. CMake's builtin FindBoost pre-dated
that, but the module requires updates for each new
release of Boost, and CMake 3.31 doesn't know about
Boost 1.88. Policy CMP0167 removes use of FindBoost
altogether such that find_package(Boost) always directly
looks for the BoostConfig.cmake file that comes with
Boost.
END QUOTE

There is also: https://cmake.org/cmake/help/latest/policy/CMP0167.html

QUOTE
Added in version 3.30.

The FindBoost module is removed.

CMake 3.29 and below provide a FindBoost module, but it
needs constant updates to keep up with upstream Boost
releases. Upstream Boost 1.70 and above provide a
BoostConfig.cmake package configuration
file.find_package(Boost CONFIG) finds the upstream
package directly, without the find module.

CMake 3.30 and above prefer to not provide the FindBoost
module so that find_package(Boost) calls, without the
CONFIG or NO_MODULE options, find the upstream
BoostConfig.cmake directly. This policy provides
compatibility for projects that have not been ported to
use the upstream Boost package.

The OLD behavior of this policy is for find_package(Boost)
to load CMake's FindBoost module. The NEW behavior is for
find_package(Boost) to search for the upstream
BoostConfig.cmake.

This policy was introduced in CMake version 3.30. It may
be set by cmake_policy() or cmake_minimum_required(). If
it is not set, CMake warns, and uses OLD behavior.

Note: The OLD behavior of a policy is deprecated by
definition and may be removed in a future version of
CMake.
END QUOTE


> Reported by: fallout
> Approved by: portmgr (blanket unbreak)
> . . .

===
Mark Millard
marklmi at yahoo.com