cmake

MySql轻松入门系列——第二站 使用visual studio 对mysql进行源码级调试

江枫思渺然 提交于 2020-08-19 03:32:12
一:背景 1. 讲故事 上一篇说了mysql的架构图,很多同学反馈说不过瘾,毕竟还是听我讲故事,那这篇就来说一说怎么利用visual studio 对 mysql进行源码级调试,毕竟源码面前,不谈隐私,圣人面前,皆为蝼蚁。 二:工具合集 mysql是C++写的,要想在windows上编译,还需要下载几个必备小工具。 mysql-5.7.12.zip cmake-3.17.3-win64-x64.msi boost_1_59_0.tar.gz bison-2.4.1-setup.exe windows 10 x64 这里简单说一下:可以用 cmake 将源码生成 *.sln 可打开的解决方案,比如可以通过它最终生成 MySQL.sln 。 boost 是C++中非常强大的基础库, bison 一个流行的语法分析器程序,用于给mysql提供语法分析,最后就是下载正确的mysql版本 5.7.12 。 三. 详细安装 我会写的比较细,毕竟我也花了一下午时间,寒酸(┬_┬) 1. cmake-3.17.3-win64-x64.msi 和 bison-2.4.1-setup.exe cmake 和 bison 安装起来比较方便,一键安装就可以了,不过这里有一个大坑注意了,在安装 Bison 的时候,千万不要使用默认路径,因为默认路径有空格,会导致你后面vs编译的时候卡住,又不显示什么原因

CMAKE_CURRENT_SOURCE_DIR

百般思念 提交于 2020-08-18 21:27:44
CMAKE_CURRENT_SOURCE_DIR CMAKE_CURRENT_SOURCE_DIR 这是当前处理的CMakeLists.txt所在的目录 CMAKE_CURRENT_LIST_DIR (自2.8.3开始)这是当前正在处理的列表文件的目录. 来自Docs: CMAKE_CURRENT_SOURCE_DIR:当前正在处理的源目录的路径. 这是cmake当前正在处理的源目录的完整路径. CMAKE_CURRENT_LIST_DIR:当前正在处理的列表文件的完整目录. 当CMake处理项目中的列表文件时,该变量将始终设置为当前正在处理的列表文件(CMAKE_CURRENT_LIST_FILE)所在的目录.该值具有动态范围.当CMake开始处理源文件中的命令时,它将此变量设置为此文件所在的目录.当CMake完成处理来自文件的命令时,它将恢复先前的值.因此,宏或函数内部变量的值是调用调用堆栈上最底部条目的文件的目录,而不是包含宏或函数定义的文件的目录. 在什么情况下这些变量会有不同的价值? 变量 CMAKE_CURRENT_SOURCE_DIR 和 CMAKE_CURRENT_LIST_DIR 可以指代由具有 include 命令的不同文件包括的CMake列表文件的不同目录.例如,如果目录项目中存在CMakeLists.txt并且包含以下指令 include(src

What is the recommended way of using GLib2 with CMake

瘦欲@ 提交于 2020-08-18 01:42:33
问题 Id like to use GLib in my C application which uses CMake as the build system. Now, I'm somehow confused how I should enable GLib in my CMakeLists.txt. Basically, you add libraries in cmake using the find_package command, so I tried, according to this bugreport find_package(GLib2) But nothing is found. In the GLib documentation it is suggested to use pkg-config , on the other hand. What is the recommended way of enabling glib in a cmake-based project? 回答1: Give a look at my answer on using

CMake: Visual Studio 15 2017 could not find any instance of Visual Studio

…衆ロ難τιáo~ 提交于 2020-08-17 19:45:07
问题 When I am trying to install CMake I get the error: Visual Studio 15 2017 could not find any instance of Visual Studio. I am using Windows 7 and Visual Studio 2017. The CMakeOutput.log file writes: The system is: Windows - 6.1.7601 - AMD64 Any ideas? 回答1: I ran into the same error and performed the following steps to resolve the issue: Open Visual Studio Go to Tools -> Get Tools and Features In the "Workloads" tab enable "Desktop development with C++" Click Modify at the bottom right These

CMake: Visual Studio 15 2017 could not find any instance of Visual Studio

ⅰ亾dé卋堺 提交于 2020-08-17 19:42:55
问题 When I am trying to install CMake I get the error: Visual Studio 15 2017 could not find any instance of Visual Studio. I am using Windows 7 and Visual Studio 2017. The CMakeOutput.log file writes: The system is: Windows - 6.1.7601 - AMD64 Any ideas? 回答1: I ran into the same error and performed the following steps to resolve the issue: Open Visual Studio Go to Tools -> Get Tools and Features In the "Workloads" tab enable "Desktop development with C++" Click Modify at the bottom right These

rebar3 的使用

时间秒杀一切 提交于 2020-08-17 16:41:34
安装 $ git clone https://github.com/erlang/rebar3.git $ cd rebar3 $ ./bootstrap $ ./rebar3 local install ===> Extracting rebar3 libs to ~/.cache/rebar3/lib... ===> Writing rebar3 run script ~/.cache/rebar3/bin/rebar3... ===> Add to $PATH for use: export PATH=$PATH:~/.cache/rebar3/bin 使用 创建 $ rebar3 new app (custom): Complete OTP Application structure. cmake (custom): Standalone Makefile for building C/C++ in c_src escript (custom): Complete escriptized application structure lib (custom): Complete OTP Library application (no processes) structure plugin (custom): Rebar3 plugin project structure

编译安装mysql

喜夏-厌秋 提交于 2020-08-17 16:12:26
mysql编译安装 1.下载mysql源码包 2.预编译 yum install cmake -y cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ -DMYSQL_UNIX_ADDR=/tmp/mysql.sock \ -DMYSQL_DATADIR=/data/mysql/ \ -DSYSCONFDIR=/etc \ -DMYSQL_USER=mysql \ -DMYSQL_TCP_PORT=3306 \ -DWITH_XTRADB_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \ -DWITH_READLINE=1 \ -DENABLED_LOCAL_INFILE=1 \ -DWITH_EXTRA_CHARSETS=1 \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci \ -DEXTRA_CHARSETS=all \ -DWITH_BIG_TABLES=1 \ -DWITH_DEBUG=0 \ -DDOWNLOAD_BOOST=1 \ -DWITH_BOOST=/usr/local/boost 备注:mysql5

Linux系统环境下MySQL数据库源代码的安装

孤街浪徒 提交于 2020-08-17 13:59:20
Linux系统环境下MySQL数据库源代码的安装 基本环境:CentOS Linux release 7.8.2003 (Core)、MySQL5.6 一、 安装环境准备 若要在Linux系统下进行Mysql源码安装,需要检查系统是否具备编译源码的工具和库:gcc、 gcc-c++、cmake,为方便后期MySQL使用,还可安装以下工具:、ncurses-devel、perl、"Development tools" "Desktop Platform Development" "Server Platform Development" 使用命令rpm –qa |grep gcc查看系统是否安装gcc 如未明确告知是否安装,还可通过命令which gcc查看是否安装: 如未安装,可直接使用命令yun install gcc安装 使用命令rpm –qa |grep gcc-c++查看系统是否安装gcc-c++ 这里提示未安装gcc-c++,可使用命令yum install gcc-c++进行安装,然后在安装提醒中选择默认或输入y,点击enter确定安装,当出现一下内容时则表示安装成功: 使用相同流程进行其他工具的安装。 提前创建数据库目录、mysql用户,并修改数据目录的属主 [root@localhost ~]# mkdir -p /mydata/data [root

ubuontu16.04安装Opencv库引发的find_package()错误信息处理及其简单使用

眉间皱痕 提交于 2020-08-17 10:42:32
  在安装完Opencv库之后,打算测试一下Opencv库是否成功安装。下面是用的例子对应的.cpp代码以及对应的CMakeLists.txt代码: .cpp文件: 1 #include <stdio.h> 2 #include <opencv2/opencv.hpp> 3 using namespace cv; 4 int main( int argc, char ** argv ) 5 { 6 if ( argc != 2 ) 7 { 8 printf( " usage: DisplayImage.out <Image_Path>\n " ); 9 return - 1 ; 10 } 11 Mat image; 12 image = imread( argv[ 1 ], 1 ); 13 if ( ! image.data ) 14 { 15 printf( " No image data \n " ); 16 return - 1 ; 17 } 18 namedWindow( " Display Image " , WINDOW_AUTOSIZE ); 19 imshow( " Display Image " , image); 20 waitKey( 0 ); 21 return 0 ; 22 } CMakeLists.txt文件: 1 cmake_minimum

iTOP4412开发板-QtE-opencv-UVC摄像头测试文档

白昼怎懂夜的黑 提交于 2020-08-17 05:27:22
本文档介绍的是在QtE系统环境下迅为iTOP4412 UVC摄像头opencv程序实验调试步骤。我们使用的是4412全功能底板。提供opencv源码“opencv-2.4.9.zip”,uvc摄像头qt源码“camera_opencv.tar.gz”以及opencv编译好的库文件“opencv-2.4.9_arm.tar.gz” OPENCV移植 我们将文件中提供的“opencv-2.4.9.zip”即opencv源码包解压,并将其通过ssh软件移至ubuntu下,作者将该文件放入了“/home/work2/cwork/opencv”下,如下图所示。 OpenCV 2.2以后版本需要使用Cmake生成makefile文件,因此需要先安装cmake。 ubuntu下安装cmake比较简单,使用命令“apt-get install cmake”,如下图所示。 使用命令“cmake --version”查看版本,测试是否安装成功。如下图所示。 我们使用命令“cd opencv-2.4.9/”进入源码目录。如下图示。 使用命令“cmake-gui”打开cmake的gui界面,开始进行配置。如下图示所示。 我们在“where is the source code”中填入电脑中opencv源码的位置,“where to build the binaries”填入生成make编译文件的位置