Skip to content

FindBoost module is removed in CMake 3.30 #399

@gabortim

Description

@gabortim

I'm using CMake 4.1.2 and upon first config, I presented with this warning:

D:\Projects\libosmium -B D:\Projects\libosmium\cmake-build-debug
-- The CXX compiler identification is GNU 15.2.0
-- The C compiler identification is GNU 15.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/mypath/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/mypath/mingw64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning (dev) at CMakeLists.txt:148 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least version "1.38")
CMake Error at CMakeLists.txt:155 (message):
  PLEASE, specify the directory where the Boost library is installed in
  BOOST_ROOT


-- Configuring incomplete, errors occurred!

[Finished]

According to the CMake docs, the method is removed and the workaround is to include BoostConfig.cmake available with Boost 1.70 and up with find_package(Boost CONFIG).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions