cmake

Mysql5.7.20源码编译安装

家住魔仙堡 提交于 2021-02-07 16:30:58
一、下载源码包 1.1 下载mysql源码包 MySQL源码,网址为:https://dev.mysql.com/downloads/mysql/ : 1.2 下载boost 下载网址为:http://www.boost.org/users/download/ 这个版本的MySQL要求boost的版本是1.59,链接为: http://www.boost.org/users/history/version_1_59_0.html 下面给出boost 1.59.0的链接,在/usr/local/src目录下直接用wget进行下载 wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.20.tar.gz 二、编译安装 2.1 安装必要的软件依赖: yum install -y cmake bison bison-devel libaio-devel gcc gcc -c++ git ncurses-devel 2.2 解压MySQL源文件: tar -zxvf mysql- 5.7 . 20 . tar .gz 将boost的压缩包移动至解压后的源文件目录内: mv boost_1_65_1. tar .gz mysql- 5.7 . 20 2.3 进入MySQL源文件目录,新建configure做为编译目录

CMake: How to only include part of OpenCV?

≡放荡痞女 提交于 2021-02-07 14:46:58
问题 When I use CMake with FIND_PACKAGE( OpenCV REQUIRED ) , all components of OpenCV get included and all libs linked, and all paths show up in include dirs in VS. However, since OpenCV 2, every part of the lib can be included and linked to on its own. So if my project only uses the "core" and "imgproc" part of OpenCV, I dont want to bloat my project (and project files) by linking to all of OpenCV. Is it possible to only include part of it in CMake? 回答1: Since OpenCV 2.4.0 it is as simple as:

CMake: How to only include part of OpenCV?

最后都变了- 提交于 2021-02-07 14:42:58
问题 When I use CMake with FIND_PACKAGE( OpenCV REQUIRED ) , all components of OpenCV get included and all libs linked, and all paths show up in include dirs in VS. However, since OpenCV 2, every part of the lib can be included and linked to on its own. So if my project only uses the "core" and "imgproc" part of OpenCV, I dont want to bloat my project (and project files) by linking to all of OpenCV. Is it possible to only include part of it in CMake? 回答1: Since OpenCV 2.4.0 it is as simple as:

CMake: How to only include part of OpenCV?

♀尐吖头ヾ 提交于 2021-02-07 14:41:50
问题 When I use CMake with FIND_PACKAGE( OpenCV REQUIRED ) , all components of OpenCV get included and all libs linked, and all paths show up in include dirs in VS. However, since OpenCV 2, every part of the lib can be included and linked to on its own. So if my project only uses the "core" and "imgproc" part of OpenCV, I dont want to bloat my project (and project files) by linking to all of OpenCV. Is it possible to only include part of it in CMake? 回答1: Since OpenCV 2.4.0 it is as simple as:

CMake & Visual Studio: How to get a quick, quiet command line build?

Deadly 提交于 2021-02-07 14:24:16
问题 I've got a cmake project that successfully does everything that I want. But I've got about 100 files, and I tire of seeing the huge output that is generated, 30 lines per file every time when I only need to recompile a single file. To be clear, I'm compiling cmake --build . to get this result. What is the parameter that I need to pass to the compiler (or MSBuild) to skip the printing that it checked the unchanged files? Compiling the project inside Visual Studio doesn't create all of this

Eclipse, cmake, Windows, MingW - What Makefile generator?

邮差的信 提交于 2021-02-07 14:14:07
问题 What's the difference on Windows with cmake and eclipse and MingW if I choose "Eclipse MingW Makefile" or "Eclipse Unix Makefile"? With the MingW one I always get an error with "sh.exe" (that vanishes if I re-hit "Configure"), with the Unix one I always have to specifiy windres manually because cmake can't find it. Does this make any difference for Eclipse or something else? Both generated Makefiles work with Eclipse and MingW and compile my project. What Makefile should I choose? And why?

CMake: Don't set rpath for a single library used in link

落花浮王杯 提交于 2021-02-07 12:48:22
问题 What I'd like to do is configure my CMakeLists file so that while building my project the linker uses a copy of a shared library (.so) that resides in my build tree to link the executable against but then does not set the rpath in the linked executable so that the system must provide the library when the loader requests it. Specifically, I want to link against libOpenCL.so during build time on a build farm that doesn't have libOpenCL.so installed as a system library. To do this, libOpenCL.so

CMake cross-compiling generate invalid linker options

百般思念 提交于 2021-02-07 12:33:43
问题 I am using CMake for compiling in Linux and Windows with a specific toolchain (nios2-linux-gnu-g++.exe (Sourcery CodeBench Lite 2013.05-43) 4.7.3). The options "-Wl,--out-implib,myapp.dll.a" and "-Wl,--major-image-version,0,--minor-image-version,0" generated from CMake to linker are invalid for compiler. Compiler errors: nios2-linux-gnu/bin/ld.exe: unrecognized option '--out-implib' nios2-linux-gnu/bin/ld.exe: unrecognized option '--major-image-version' nios2-linux-gnu/bin/ld.exe:

cmake link against dll/lib

我怕爱的太早我们不能终老 提交于 2021-02-07 12:26:18
问题 The output of my cmake is a static library. I'm creating it as such: add_library(myMainLib STATIC ${BACKEND_SOURCES}) Problems arise when I try to get myMainLib to link against a third party lib/dll. The dll file will be found at run time, however, I'm trying to import/link against the lib file, with no success. My third party library is SDL2 and SDL2 NET. I would think this is straight forward and have exhausted all methods I've found online. All fail. A list of what I've tried is below.

Escape “[]” characters in a semicolon-separated list in CMake

孤街浪徒 提交于 2021-02-07 11:52:53
问题 I found "[" and "]" might have special meanings in a semicolon-separated list in CMake . When I try this code in CMakeLists.txt : set(XX "a" "b" "[" "]") message("${XX}") foreach(x ${XX}) message("--> ${x}") endforeach() I expect the result: a;b;[;] --> a --> b --> [ --> ] However I got this: a;b;[;] --> a --> b --> [;] I didn't find any documentation for the usage of "[" and "]". Is it possible to escape these characters so that I can get the expected result? I am using CMake 2.8.12.2 .