cmake

cmake - osx/mac - openssl brew

亡梦爱人 提交于 2020-04-07 19:06:45
问题 i am using the following cmake commands # Search OpenSSL find_package(PkgConfig REQUIRED) pkg_search_module(OPENSSL REQUIRED openssl) if( OPENSSL_FOUND ) include_directories(${OPENSSL_INCLUDE_DIRS}) message(STATUS "Using OpenSSL ${OPENSSL_VERSION}") else() # Error; with REQUIRED, pkg_search_module() will throw an error by it's own endif() it works on linux and on Mac - but on mac it uses the osx-shipped libssl - wich throws a alot of deprecation warnings e.g. 'SSL_library_init' is deprecated:

cmake - osx/mac - openssl brew

霸气de小男生 提交于 2020-04-07 19:05:24
问题 i am using the following cmake commands # Search OpenSSL find_package(PkgConfig REQUIRED) pkg_search_module(OPENSSL REQUIRED openssl) if( OPENSSL_FOUND ) include_directories(${OPENSSL_INCLUDE_DIRS}) message(STATUS "Using OpenSSL ${OPENSSL_VERSION}") else() # Error; with REQUIRED, pkg_search_module() will throw an error by it's own endif() it works on linux and on Mac - but on mac it uses the osx-shipped libssl - wich throws a alot of deprecation warnings e.g. 'SSL_library_init' is deprecated:

cmake - osx/mac - openssl brew

依然范特西╮ 提交于 2020-04-07 19:05:16
问题 i am using the following cmake commands # Search OpenSSL find_package(PkgConfig REQUIRED) pkg_search_module(OPENSSL REQUIRED openssl) if( OPENSSL_FOUND ) include_directories(${OPENSSL_INCLUDE_DIRS}) message(STATUS "Using OpenSSL ${OPENSSL_VERSION}") else() # Error; with REQUIRED, pkg_search_module() will throw an error by it's own endif() it works on linux and on Mac - but on mac it uses the osx-shipped libssl - wich throws a alot of deprecation warnings e.g. 'SSL_library_init' is deprecated:

【3D】姿态检测网络PoseCNN复现过程记录

纵然是瞬间 提交于 2020-04-07 14:50:14
最近在研究室内6D姿态检测相关问题,计划在PoseCNN网络基础上进行改进实现。但是在第一步的复现过程中踩了无数的坑,最终成功运行了demo,但目前数据集train还是遇到了一些问题。有问题欢迎一起交流进步! 本文重点讲解网络代码复现过程,对于原文的讲解可以阅读这篇文章,满满干货! 《论文笔记——PoseCNN》 本人系统环境: Ubuntu 16.04 Tensorflow 1.8(from source) Python 2.7 Cuda 10.1 & cuddn 7.3.1 1.搭建虚拟环境 第一步,创建专属于PoseCNN的虚拟环境,之后install的包都在此虚拟环境中。 虚拟环境的好处不用多说了吧,反正对Ubuntu系统的折腾越少越好!!! 我用 conda 创建的环境: conda create -n posecnn python=2.7 激活环境: conda activate posecnn 如果不用这个环境,记得deactivate: conda deactivate posecnn 2.pip install pip install opencv-python 如果不行试一下: sudo apt-get install libopencv-dev pip install mock enum34 pip install matplotlib numpy keras

老白学编程- “autotools” 的碎片记忆

我怕爱的太早我们不能终老 提交于 2020-04-06 02:56:16
Autotools 碎片记忆 大部分程序猿包括我都曾经下载并编译过开源的软件,通常有如下步骤: 1. 下载 2. 解压 3. ./configure 4. make 5. make install 但其实我并不清楚,这套路是什么,这个configure怎么来的,这个install要去哪; 研究了GNU build system,由于年龄太大,整理一下碎片以用来记忆,以后好深入学习。 基本概念 makefile 我刚学习完, 但是如果新建工程,很大很大的那种, 手写make还是比较痛苦的,最好是有工具可以搞定。 对于入门的我来说,一张白纸,只知道autotool和cmake,由于许多GNU的库都是autotools,那就开始研究autotools吧。 GNU build system 背景不多说了,自行阅读。 GNU build system 目标 打包,主要是打出可移植的包 定义各种宏变量,通过 #if/#else 在程序中判断,采取不同的套路。 统一的编译,自动配置 目前,configure 脚本是GNU package 必带的脚本,他用来探测系统的库,工具,然后生成 config.h ,其中包括了各种 #defines; makefile 中的 target 通常来说,GNU 的 makefile中,有一些标准的targets make all : 与 make 一样 make

CMake...

回眸只為那壹抹淺笑 提交于 2020-04-04 17:03:26
http://blog.atime.me/note/cmake.html 简单的例子 一个完整的Demo可参考 这里 。 假设当前目录的结构为 ./a.cpp ./b.cpp ./include/common.h ./include/defines.h ./other/c.cpp ./other/d.cpp ./lib/libB.a ./lib/libBd.a ./lib/libA.so ./lib/libAd.so ./lib/libB.so ./lib/libBd.so ./lib/libC.so ./lib/libCd.so 使用下面的CMakeLists.txt文件,目标是编译当前目录和./other目录下的所有源文件,并链接./lib目录下的相应库文件到最终的可执行文件./bin/hello(或./bin/hellod)。 cmake_minimum_required(VERSION 2.8) project(helloworld) set(CMAKE_VERBOSE_MAKEFILE on) set(CMAKE_CXX_COMPILER "g++") set(CMAKE_CXX_FLAGS "-Wall") set(CMAKE_CXX_FLAGS_DEBUG "-g3") set(CMAKE_CXX_FLAGS_RELEASE "-O2") set(EXECUTABLE

2. CMake 系列 - 编译多文件项目

依然范特西╮ 提交于 2020-04-04 17:00:45
目录 1. 编译不使用第三方库的项目 1.1 项目目录结构 1.2 相关代码 1.3 编译 2. 编译使用第三方库的项目 2.1 项目目录结构 2.2 相关代码 2.3 编译 1. 编译不使用第三方库的项目 1.1 项目目录结构 test/ ├── build ├── CMakeLists.txt └── src ├── include │ └── sub │ └── sub.h ├── init │ └── main.c └── sub └── sub.c 博主一般写项目都是以这种风格进行划分目录,这个风格也是参考内核风格。 build : 存放 cmake 生成的相关文件和make 编译生成的相关中间文件 CMakeLists.txt : 使用cmake 语法编写这个文件,cmake 负责将其转换为相对应makefile src : 存放源代码 include : 存放每个模块头文件,每个模块都有自己的目录; 1.2 相关代码 sub.h #ifndef _SUB_H #define _SUB_H int sub(const int a, const int b); #endif sub.c #include "sub/sub.h" int sub(const int a, const int b) { return a - b; } main.c #include "sub

CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp.

佐手、 提交于 2020-04-02 21:51:41
微型电脑或嵌入式与电脑还是有点不同的,在微型电脑上ros indigo 版本下利用catkin编译如果你遇到如下错误: CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp. CMake error:at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:380 解决方法: 1. 切到root用户:用su、su - root或su - (用户名root可以省略不写。) 2. 这样如果出现Authentication failed 等类似错误,则用 sudo bash 3. 然后用catkin_make编译,等编译好了, 4. 则返回普通用户即可 方法: su - (你的用户名) 来源: https://www.cnblogs.com/zjiaxing/p/5553974.html

android studio NDK配置

喜你入骨 提交于 2020-04-01 13:07:29
向您的项目添加 C 和 C++ 代码 本文内容 下载 NDK 和构建工具 创建支持 C/C++ 的新项目 构建和运行示例应用 向现有项目添加 C/C++ 代码 创建新的原生源文件 创建 CMake 构建脚本 将 Gradle 关联到您的原生库 搭配使用 Android Studio 2.2 或更高版本 与 Android Plugin for Gradle 版本 2.2.0 或更高版本 时,您可以将 C 和 C++ 代码编译到 Gradle 与 APK 一起打包的原生库中,将这类代码添加到您的应用中。您的 Java 代码随后可以通过 Java 原生接口 (JNI) 调用您的原生库中的函数。如果您想要详细了解如何使用 JNI 框架,请阅读 Android 的 JNI 提示 。 Android Studio 用于构建原生库的默认工具是 CMake。由于很多现有项目都使用构建工具包编译其原生代码,Android Studio 还支持 ndk-build 。如果您想要将现有的 ndk-build 库导入到您的 Android Studio 项目中,请参阅介绍如何配置 Gradle 以 关联到您的原生库 的部分。不过,如果您在创建新的原生库,则应使用 CMake。 本页面介绍的信息可以帮助您使用所需构建工具设置 Android Studio、创建或配置项目以支持 Android 上的原生代码