BoostDetectToolset-1.90.0.cmake file not found in an include() call in boost_python-config.cmake

未关闭
#525 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
cmake, cpp, macos, python
领域
build-system

调研方向

使用所述的 Boost 和 Python 版本运行随附的 CMakeLists.txt 示例,然后检查失败的 include() 调用附近的 boost_python-config.cmake 和 BoostConfig.cmake。将生成的配置路径与 issue 中报告的 BoostDetectToolset-1.90.0.cmake 位置进行比较;当 find_package(Boost REQUIRED COMPONENTS python) 成功完成时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

I first installed Python 3.14, Boost 1.90.0 and Boost.Python with Brew on my macOS Sonoma 14.4 and built a minimum working example with CMake, but it didn't work.

When I used

find_package(Boost REQUIRED COMPONENTS python)

to find Boost and ran with command

cmake .. -DCMAKE_PREFIX_PATH='/usr/local/opt/boost' -DBoost_DEBUG=1

the following error occured:

CMake Error at /usr/local/lib/cmake/boost_python-1.90.0/boost_python-config.cmake:29 (include):
  include could not find requested file:

    /usr/local/lib/cmake/boost_python-1.90.0/../BoostDetectToolset-1.90.0.cmake
Call Stack (most recent call first):
  /usr/local/opt/boost/lib/cmake/Boost-1.90.0/BoostConfig.cmake:141 (find_package)
  /usr/local/opt/boost/lib/cmake/Boost-1.90.0/BoostConfig.cmake:262 (boost_find_component)
  CMakeLists.txt:10 (find_package)

After checking the file system, no file named BoostDetectToolset-1.90.0.cmake was found in either /usr/local/lib/cmake/boost_python-1.90.0/.., /usr/local/opt/boost-python3/lib/cmake, or /usr/local/Cellar/boost-python3/1.90.0/lib/cmake. The only BoostDetectToolset-1.90.0.cmake file was in /usr/local/Cellar/boost/1.90.0_1/lib/cmake.

Because there is a

include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-1.90.0.cmake)

in the file /usr/local/lib/cmake/boost_python-1.90.0/boost_python-config.cmake which was auto-generated by Boost, and CMAKE_CURRENT_LIST_DIR here refers to /usr/local/lib/cmake/boost_python-config.cmake, I suppose there must be something wrong with the generator of the file.

The following are my minimum working example:
CMakeLists.txt
module.cpp

Do you have any suggestions? Thanks in advance.

主要语言
C++
星标
537
派生
223
平均合并
11 小时 22 分钟
30 天内合并 PR
2

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

boostorg/python 的其他 Issue

查看 boostorg/python 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。