cmake设定boost python3
在mac上操作的。python3是anaconda环境下装的,3.7.1。
boost是用brew装的,1.71.0版本。
按照FindBoost.cmake官方写法的CMakeLists.txt:
find_package(Boost REQUIRED COMPONENTS python37)
add_executable(foo foo.cc)
target_link_libraries(foo Boost::python37)
然而实测发现找不到boost python37。
解决:当boost版本高于1.70时,调用cmake时应该传入-D Boost_NO_BOOST_CMAKE:BOOL=ON参数。
参考:https://www.forum.freecadweb.org/viewtopic.php?f=4&t=39301
cmake设定boost python3的更多相关文章
- python学习--Linux下dlib安装(主要是cmake和boost的安装)
昨天我们使用了dlib和opencv进行了人脸检测标注(http://www.cnblogs.com/take-fetter/p/8310298.html) 但是运行环境是基于windows的而且可能 ...
- boost python3依赖安装
之前写过python dlib依赖的安装,当时是使用了系统默认的python2.7安装的boost.Python,如果自己编译好python3,想安装支持python3的boost.Python也是可 ...
- Boost 和 Boost.Build 的设置
问题: 安装编译完 Boost 后,如果不设置 BOOST_ROOT 和 BOOST_BUILD_PATH 则可能导致使用 bjam 时定位到 Boost 默认的路径 /usr/share/boost ...
- windows上编译boost库
要用xx库,编译boost时就指定--with-xx.例如: # 下载并解压boost_1.58 # 进入boost_1.58目录 bjam.exe toolset=msvc-14.0 --build ...
- mac下使用clion构建boost库
mac下使用clion构建boost库 使用brew install boost 完成后发现boost被安装在在/usr/local/Cellar/boost下 jetbrain给出的指导意见 htt ...
- C++: Mac上安装Boost库并使用CLion开发
1.下载安装Boost库 官网下载最新版本1.65.0:http://www.boost.org/users/history/version_1_65_0.html 选择UNIX版本: 下载后解压cd ...
- CMake入门(二)
CMake入门(二) 最后更新日期:2014-04-25 by kagula 阅读前提:<CMake入门(一)>.Linux的基本操作 环境: Windows 8.1 64bit英文版.V ...
- CMake搜索Boost1.57失败及解决
CMake更新到3.1.0,Boost更新到1.57,结果CMake搜索Boost失败: Unable to find the Boost header files. Please set BOOS ...
- Clion使用MinGW编译好的boost库
MinGW编译Boost库可以参考我之前写的编译Boost的文章. 以下是cmake链接boost静态库的配置: cmake_minimum_required(VERSION 3.8) project ...
随机推荐
- 洛谷 SP9722 CODESPTB - Insertion Sort
洛谷 SP9722 CODESPTB - Insertion Sort 洛谷传送门 题目描述 Insertion Sort is a classical sorting technique. One ...
- USACO Cow Cars
洛谷 P2909 [USACO08OPEN]牛的车Cow Cars https://www.luogu.org/problemnew/show/P2909 JDOJ 2584: USACO 2008 ...
- Associatively Segmenting Instances and Semantics in Point Clouds
论文引入一个简单且灵活的框架同时分割点云中的实例和语义,进一步提出两种方法让两个任务从彼此受益. 代码: https://github.com/WXinlong/ASIS 论文: https://ar ...
- html表格及列表
表格的属性: border:边框 cellpadding:内边距 单元格边框跟内容之间的间距 cellspacing:外边距 单元格跟单元格之间的距离 align:表格的对其样式 width:宽度 ...
- [LeetCode] 87. Scramble String 搅乱字符串
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin ...
- 常用shell脚本
[脚本1]打印形状打印等腰三角形.直角三角形.倒直角三角形.菱形 #!/bin/bash # 等腰三角形 read -p "Please input the length: " n ...
- Python文件读写机制
Python提供了必要的函数和方法进行默认情况下的文件基本操作 文件打开方式: open(name[,mode[buf]]) name:文件路径 mode:打开方式 buf:缓冲buffering大小 ...
- no main manifest attribute, in testProject-1.0-SNAPSHOT.jar
no main manifest attribute, in testProject-1.0-SNAPSHOT.jar 错误描述: no main manifest attribute, in tes ...
- 面向对象之isinstance与issubclass(python内置方法)
isinstanceissubclass TOC isinstance 判断一个对象是否是另外一个类的实例,返回布尔值. 是:True 否:False class Foo: pass class Bo ...
- vue+element 给表格添加数据,页面不实时刷新的问题
由于页面加载时,使用了keep-alive,keep-alive具有数据缓存作用,当在添加页面添加成功时,返回主页面没有立即更新.数据有缓存. 解决办法如下: 将获取数据列表的方法放到activate ...