Skip to content

find_package(Boost) fails during installation #5936

Closed
@djarek

Description

  Found package configuration file:

    /usr/local/lib/cmake/boost_context-1.70.0/boost_context-config.cmake

  but it set boost_context_FOUND to FALSE so package "boost_context" is
  considered to be NOT FOUND.  Reason given by package:

  No suitable build variant has been found.

Call Stack (most recent call first):
  /usr/local/lib/cmake/Boost-1.70.0/BoostConfig.cmake:95 (find_package)
  /usr/local/lib/cmake/Boost-1.70.0/BoostConfig.cmake:124 (boost_find_dependency)
  /home/damian/projects/vcpkg/scripts/buildsystems/vcpkg.cmake:197 (_find_package)
  /home/damian/projects/vcpkg/downloads/tools/cmake-3.12.4-linux/cmake-3.12.4-Linux-x86_64/share/cmake-3.12/Modules/FindBoost.cmake:261 (find_package)
  /home/damian/projects/vcpkg/scripts/buildsystems/vcpkg.cmake:197 (_find_package)
  CMakeLists.txt:25 (find_package)

Installing a vcpkg library that depends on Boost fails if there is a system-installed Boost 1.70.
Removing the system-installation resolves the issue. Note that it's likely that consuming libraries may also fail in these conditions.

I suspect this is caused by FindBoost deferring to Boost's own cmake config scripts (they were introduced in 1.70).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    requires:reproThe issue is not currently repro-able

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions