cmake

how to convert LLVM clang++ command line to cmake config?

99封情书 提交于 2021-01-01 07:06:27
问题 I'm building a LLVM language with some tutorials. In a situation, there are command with: clang++ -g main.cpp `llvm-config --cxxflags --ldflags --system-libs --libs core orcjit native` -O3 -o toy here a command llvm-config --cxxflags --ldflags --system-libs --libs core orcjit native which can expand to: -I/usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing

Building LLVM using Visual Studio

≯℡__Kan透↙ 提交于 2021-01-01 06:45:26
问题 I'm trying to build LLVM using visual studio 2012 (version 10.0). I have CMake installed and have run the following commands: svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm cd llvm\tools svn co http://llvm.org/svn/llvm-project/cfe/trunk clang cd .... mkdir build cd build cmake -G "Visual Studio 10" ..\llvm Running these commands works fine, until the last step. I receive a large number of warnings(?) which are as follows: -- Looking for dirent.h -- Looking for dirent.h - not found --

CMake install targets with relative paths

徘徊边缘 提交于 2021-01-01 06:42:39
问题 I am trying to figure out how to write a library that could be consumed by calling find_package() in another project. I am trying to follow the Catch2 repo CMake file. This is a minimal version that I have come up with: (the git repo is available here) cmake_minimum_required(VERSION 3.14.4) set(project_name "hello") project(${project_name} LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") include(GNUInstallDirs) include(CMakePackageConfigHelpers) add_library($

CMake install targets with relative paths

本小妞迷上赌 提交于 2021-01-01 06:42:32
问题 I am trying to figure out how to write a library that could be consumed by calling find_package() in another project. I am trying to follow the Catch2 repo CMake file. This is a minimal version that I have come up with: (the git repo is available here) cmake_minimum_required(VERSION 3.14.4) set(project_name "hello") project(${project_name} LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") include(GNUInstallDirs) include(CMakePackageConfigHelpers) add_library($

Ansible运维的必备工具

折月煮酒 提交于 2021-01-01 05:55:30
Ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet、cfengine、chef、func、fabric)的优点,实现了批量系统配置、批量程序部署、批量运行命令等功能。 ansible是基于模块工作的,本身没有批量部署的能力。真正具有批量部署的是ansible所运行的模块,ansible只是提供一种框架。主要包括: (1)、连接插件connection plugins:负责和被监控端实现通信; (2)、host inventory:指定操作的主机,是一个配置文件里面定义监控的主机; (3)、各种模块核心模块、command模块、自定义模块; (4)、借助于插件完成记录日志邮件等功能; (5)、playbook:剧本执行多个任务时,非必需可以让节点一次性运行多个任务。 一、系统安装 [root@centos6 ~]# cat /etc/issue CentOS release 6.5 (Final) [root@centos6 ~]# uname -r 2.6.32-431.el6.x86_64 二、软件安装 [root@centos6 ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm [root@centos6 ~]#

FreeSWITCH 安装

拟墨画扇 提交于 2020-12-30 21:04:25
[TOC] FreeSWITCH 安装 FreeSWITCH 是一个 电话的软交换解决方案 ,包括一个软电话和软交换机用以提供语音和聊天的产品驱动。FreeSWITCH 可以用作交换机引擎、PBX、多媒体网关以及多媒体服务器等。 版本 FreeSWITCH 1.10.1 环境 Ubuntu 18.04_64位 软件包 cmake-3.13.3-Linux-x86_64.tar.gz freeswitch-1.10.1.-release.tar.xz freeswitch-sounds-en-us-callie-*-1.0.52.tar.gz freeswitch-sounds-music-*-1.0.52.tar.gz freeswitch-sounds-zh-cn-sinmei-*-1.0.51.tar.gz 下载地址 参考脚本 #install freeswitch 1.10.1 for ubuntu 18.04 64位 # 创建ubuntu用户 useradd -d "/home/ubuntu" -m -s "/bin/bash" ubuntu passwd ubuntu chmod u+w /etc/sudoers vi /etc/sudoers # ubuntu ALL=(ALL) ALL chmod u-w /etc/sudoers # 使用ubuntu mkdir

Nuget package from CMake

人走茶凉 提交于 2020-12-29 13:18:43
问题 I am generating an C# WPF project using CMake. I followed this CMakeLists.txt example from Github. My question is: How can add a Nuget package to this project using CMake? 回答1: CMake 3.15 and above supports referencing Nuget packages with VS_PACKAGE_REFERENCES. To add a Nuget package reference to a CMake target, use the package name and package version separated by an underscore _ . Here is an example for BouncyCastle version 1.8.5: set_property(TARGET MyApplication PROPERTY VS_PACKAGE

Nuget package from CMake

送分小仙女□ 提交于 2020-12-29 13:12:39
问题 I am generating an C# WPF project using CMake. I followed this CMakeLists.txt example from Github. My question is: How can add a Nuget package to this project using CMake? 回答1: CMake 3.15 and above supports referencing Nuget packages with VS_PACKAGE_REFERENCES. To add a Nuget package reference to a CMake target, use the package name and package version separated by an underscore _ . Here is an example for BouncyCastle version 1.8.5: set_property(TARGET MyApplication PROPERTY VS_PACKAGE

Nuget package from CMake

让人想犯罪 __ 提交于 2020-12-29 13:10:01
问题 I am generating an C# WPF project using CMake. I followed this CMakeLists.txt example from Github. My question is: How can add a Nuget package to this project using CMake? 回答1: CMake 3.15 and above supports referencing Nuget packages with VS_PACKAGE_REFERENCES. To add a Nuget package reference to a CMake target, use the package name and package version separated by an underscore _ . Here is an example for BouncyCastle version 1.8.5: set_property(TARGET MyApplication PROPERTY VS_PACKAGE

Possible to force CMake/MSVC to use UTF-8 encoding for source files without a BOM? C4819

半城伤御伤魂 提交于 2020-12-28 20:03:45
问题 All our source code is valid UTF-8, however some users on Windows cannot build them because their system is configured for a different encoding. Without adding a BOM to source files, is it possible to tell MSVC to treat all source as UTF-8, irrespective of the users system encoding? See MSDN's link regarding this topic (requires adding BOM header). 回答1: You can try: add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>") add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>") By default,