cmake

Building CMAKE for cygwin

早过忘川 提交于 2021-02-08 10:13:01
问题 This is my first time using both Cygwin and cmake , I'm trying to build a project but keep getting errors. -bash: /usr/local/bin/cmake: cannot execute binary file The questions I have are, where should cmake be installed and how do I run it? Where should my source code be? Do I need anything extra to get cmake to work in Cygwin? Here is a link to the project I am trying to run: (https://github.com/erinaceous/shadows) 回答1: cmake is available in the Cygwin net distribution. You can install it

玩转Linux必备的金钥匙之源码安装mysql依赖程序

我的未来我决定 提交于 2021-02-08 09:51:22
安装mysql依赖程序 提示:先保证网络畅通,虚拟机则选择nat模式,不同情况安装的linux系统,需要的依赖包数量版本不一样,最小安装的依赖包就需要多装一些,您的系统版本老可能依赖包版本也不能过高,否则不兼容。 cmake 提示:这些依赖包,也有自己需要的依赖包,先安装它所需依赖包再安装cmake,顺序不能变,否则会缓存错误信息即便清除缓存正确安装也无法解决, cmake包可以下载好挂载,也可以执行此命令在线下载wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz 1、 安装或升级依赖包 用yum联网自动安装依赖包:yum -y install gcc gcc-c++ make libtool zlib zlib-devel pcre pcre-devel openssl openssl-devel 2、 解压、 bootstrap编译 3、 编译并安装 以上步骤不报错,下面很容易执行:gmake && gmake install 和女朋友出去逛逛街再回来,这个操作需要30分钟。查看版本即可。 安装boost 提示:也是要先安装它所需要的依赖包(奇妙吧,依赖包也有依赖包要预先安装) 1、解压 tar zxf /mnt/boost_1_59_0.tar.gz -C /usr

CMake target_sources and install

馋奶兔 提交于 2021-02-08 08:24:19
问题 I am having a hard time figuring out how to install PUBLIC headers specified in target_sources(). It appears that target_sources() is somewhat of a mystery for anything other than adding private sources to an executable. After reading a lot of material, where especially this blog entry was helpful, I managed to understand & bypass the issue with target_sources() and PUBLIC files. A CMakeLists.txt in one of the many subdirectories of my C++ library project looks like this: target_sources(mylib

CMake target_sources and install

北城余情 提交于 2021-02-08 08:22:21
问题 I am having a hard time figuring out how to install PUBLIC headers specified in target_sources(). It appears that target_sources() is somewhat of a mystery for anything other than adding private sources to an executable. After reading a lot of material, where especially this blog entry was helpful, I managed to understand & bypass the issue with target_sources() and PUBLIC files. A CMakeLists.txt in one of the many subdirectories of my C++ library project looks like this: target_sources(mylib

CLion - CMake error while creating new project

折月煮酒 提交于 2021-02-08 08:15:16
问题 I just installed CLion on my computer with MinGW and decided to create a simple Hello World project to test it, but when I create it the console outputs an error: >"C:\Program Files (x86)\JetBrains\CLion 2016.3.3\bin\cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" "E:\Programação\C++\Hello World" >-- The C compiler identification is GNU 5.3.0 >-- The CXX compiler identification is GNU 5.3.0 >-- Check for working C compiler: C:/MinGW/bin/gcc.exe >-- Check for

Cmake - change where the lib and include directories are for an externalproject and proper linking

我们两清 提交于 2021-02-08 06:53:48
问题 cmake_minimum_required(VERSION 3.2.1 FATAL_ERROR) project("soxy") add_definitions(-std=c99) include_directories(soxy) # Includes include(ExternalProject) ExternalProject_Add( LibUV GIT_REPOSITORY "https://github.com/libuv/libuv.git" GIT_TAG "v1.4.2" CONFIGURE_COMMAND sh <SOURCE_DIR>/autogen.sh && ./configure --prefix=${CMAKE_CURRENT_SOURCE_DIR} PATCH_COMMAND "" BUILD_COMMAND "make" BUILD_IN_SOURCE 1 PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/build ) set( SOXY_SRC src/file_utils.c src/http_parser.c

Modern CMake transitive Dependency not found

时间秒杀一切 提交于 2021-02-08 06:46:37
问题 I am currently working on implementing a ROS library into our company software stack. Because the library is based on ROS and thus uses catkin I am rewriting the library to use cmake exclusively and try to apply the modern CMake approach. The library is structured as follows: . |-- CMakeLists.txt |-- LICENSE |-- README.md |-- grid_map_core | |-- CHANGELOG.rst | |-- CMakeLists.txt | |-- cmake | | `-- grid_map_core-extras.cmake | |-- grid_map_coreConfig.cmake | |-- include | | `-- grid_map_core

Undefined symbol in Boost.Python module

帅比萌擦擦* 提交于 2021-02-08 05:38:15
问题 I'm trying to build a small Python extension for a certain instantiation of a templated library, using Boost.Python. This library uses extensively the CGAL library, which integrates fairly well with CMake, that I'm therefore using for my project. Here's the code for my module (python_export.cpp): #include <boost/python.hpp> #include <CGAL/Exact_spherical_kernel_3.h> #include "Sphere_intersecter.h" // header-only typedef CGAL::Exact_spherical_kernel_3 SK; template class Sphere_intersecter<SK>;

Emitting a single IR bitcode File with LLVM LLD using CMake

强颜欢笑 提交于 2021-02-08 05:14:44
问题 I'm using Ubuntu 16.04 x86_64 and LLVM 5.0 and would like to compile a project to a single LLVM IR bitcode file using CMake. I know there is a way to do this using the GOLD Linker with the LLVM Plugin and add the CMake linker flags " -fuse-ld=gold -Wl,-plugin-opt=emit-llvm " and the CXX flag " -flto ". But when I try to compile the project with the LLVM LLD linker and the " -fuse-ld=lld -Wl,-plugin-opt=emit-llvm " respectively " -flto " Flag, the linker is generating a native executable and

How to group multiple library targets into one in CMake

孤街醉人 提交于 2021-02-08 05:14:35
问题 I am trying to group multiple targets into a single one so the downstream user only need to link to that single one. The downstream user won't need to look up all the targets and all functionality from the upstream library will be available by linking to that single one. Please see below CMakeLists of my failed attempt. cmake_minimum_required(VERSION 3.11) project(modules) # 10 libraries with actually functionality add_subdirectory(mylib1) add_subdirectory(mylib2) ... add_subdirectory(mylib10