当前位置: 首页 > news >正文

自住房车各项建设部网站商务酒店设计网站建设

自住房车各项建设部网站,商务酒店设计网站建设,wordpress 主题不存在,东莞建设网站开发文章目录 第0章 配置环境0.1 获取代码0.2 Docker镜像0.3 安装必要的软件0.3.1 获取CMake0.3.2 编译器0.3.3 自动化构建工具0.3.4 Python0.3.5 依赖软件0.3.5.1 BLAS和LAPACk0.3.5.2 消息传递接口(MPI)0.3.5.3 线性代数模板库0.3.5.4 Boost库0.3.5.5 交叉编译器0.3.5.6 ZeroMQ, …

文章目录

  • 第0章 配置环境
  • 0.1 获取代码
  • 0.2 Docker镜像
  • 0.3 安装必要的软件
    • 0.3.1 获取CMake
    • 0.3.2 编译器
    • 0.3.3 自动化构建工具
    • 0.3.4 Python
    • 0.3.5 依赖软件
      • 0.3.5.1 BLAS和LAPACk
      • 0.3.5.2 消息传递接口(MPI)
      • 0.3.5.3 线性代数模板库
      • 0.3.5.4 Boost库
        • 0.3.5.5 交叉编译器
        • 0.3.5.6 ZeroMQ, pkg-config, UUID和Doxygen
        • 0.3.5.7 Conda的构建和部署
  • 0.4 测试环境
  • 0.5 上报问题并提出改进建议

第0章 配置环境

  • 主要内容
    • 如何获取代码
    • GNU/Linux、macOS和Windows 安装示例所需工具
    • 自动化测试如何工作
    • 报告问题,提出改进建议

0.1 获取代码

  • git
    • git clone https://github.com/...git
    • 获取特定版本 --single-branch -b v1.0
      • git clone --single-branch -b v1.0 https://github.com/...git
    • 获取更新,选择库的master分支

0.2 Docker镜像

  • Docker 环境搭建
$ docker run -it devcafe/cmake-cookbook_ubuntu-18.04
$ git clone https://github.com/dev-cafe/cmake-cookbook.git
$ cd cmake-cookbook
$ pipenv install --three
$ pipenv run python testing/collect_tests.py 'chapter-*/recipe-*'

0.3 安装必要的软件

  • 主机操作系统安装依赖项,安装组件
      1. CMake
      1. 编译器
      1. 自动化构建工具
      1. Python

0.3.1 获取CMake

  • GNU/Linux
$ cmake_version="3.5.2"
$ target_path=$HOME/Deps/cmake/${cmake_version}
$ cmake_url="https://cmake.org/files/v${cmake_version%.*}/cmake-${cmake_version}-Linux-x86_64.tar.gz"
$ mkdir -p "${target_path}"
$ curl -Ls "${cmake_url}" | tar -xz -C "${target_path}" --strip-components=1
$ export PATH=$HOME/Deps/cmake/${cmake_version}/bin${PATH:+:$PATH}
$ cmake --version
  • Windows
    • Visual Studio 2017 构建CMake项目
    • 下载MSYS2安装程序,按说明更新包列表,用pacman安装CMake
$ pacman -S mingw64/mingw-w64-x86_64-cmake

0.3.2 编译器

  • C++、C和Fortran 编译器

  • 跨平台,并尽可能独立于操作系统(开源编译器)

  • GNU/Linux

    $ sudo apt-get install g++ gcc gfortran
    
  • Windows

    $ pacman -S mingw64/mingw-w64-x86_64-toolchain
    

0.3.3 自动化构建工具

  • 自动化构建工具:为项目提供构建和链接的基础设施,最终安装和使用什么,取决于操作系统
    • GNU/Linux上,GNU Make
    • macOS上,XCode将提供GNU Make
    • Windows上,Visual Studio ;MSYS2 GNU Make作为mingw64/mingw-w64-x86_64工具链包的一部分
  • 可移植性,尽量使示例不受系统相关细节影响;编译器固有特性:配置、构建和链接
  • 自动化构建工具
    • Ninja 适用于GNU/Linux、macOS和Windows
      • 注重速度,贴别是增量重构
      • Fortran
      • 安装Ninja:
$ mkdir -p ninja
$ ninja_url="https://github.com/Kitware/ninja/releases/download/v1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1/ninja-1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1_x86_64-linux-gnu.tar.gz"
$ curl -Ls ${ninja_url} | tar -xz -C ninja --strip-components=1
$ export PATH=$HOME/Deps/ninja${PATH:+:$PATH}
  • windows MSYS2环境
$ pacman -S mingw64/mingw-w64-x86_64-ninja

0.3.4 Python

  • Python安装
    • 解释器、头文件和库
    • Ubuntu 14.04 LTS
sudo apt-get install python3.5-dev
  • Windows MSYS2环境
$ pacman -S mingw64/mingw-w64-x86_64-python3
$ pacman -S mingw64/mingw-w64-x86_64-python3-pip
$ python3 -m pip install pipenv
  • 建议使用包管理器在隔离的环境中安装这些包
    • 不影响系统环境下,进行包的清理/安装
    • 没有管理员权限的情况下安装包
    • 降低软件版本和依赖项冲突的风险
    • 复现性,可更好地控制包地依赖性
  • Pipfile 结合pipfile.lock 使用Pipenv,创建独立环境安装所有包
$ pip install --user pip pipenv --upgrade
$ pipenv install --python python3.5
  • 执行pipenv shell进入一个命令行环境,包含特定版本Python和可用的包;执行exit退出当前环境;使用pipenv run在隔离环境中直接执行命令
  • 将库中requirements.txt文件与Virtualenvpip结合使用
$ virtualenv --python=python3.5 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
  • deactivate命令退出虚拟环境
  • Conda环境,安装Miniconda
$ curl -Ls https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > miniconda.sh
$ bash miniconda.sh -b -p "$HOME"/Deps/conda &> /dev/null
$ touch "$HOME"/Deps/conda/conda-meta/pinned
$ export PATH=$HOME/Deps/conda/bin${PATH:+:$PATH}
$ conda config --set show_channel_urls True
$ conda config --set changeps1 no
$ conda update --all
$ conda clean -tipy
  • Windows 下载Miniconda(或使用PowerShell安装)
$basedir = $pwd.Path + "\"
$filepath = $basedir + "Miniconda3-latest-Windows-x86_64.exe"
$Anaconda_loc = "C:\Deps\conda"
$args = "/InstallationType=JustMe /AddToPath=0 /RegisterPython=0 /S /D=$Anaconda_loc"
Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru
$conda_path = $Anaconda_loc + "\Scripts\conda.exe"
$args = "config --set show_channel_urls True"
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
$args = "config --set changeps1 no"
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
$args = "update --all"
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
$args = "clean -tipy"
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
  • 安装Conda后,安装Python模块
$ conda create -n cmake-cookbook python=3.5
$ conda activate cmake-cookbook
$ conda install --file requirements.txt
  • 执行conda deactivate将退出conda的环境

0.3.5 依赖软件

0.3.5.1 BLAS和LAPACk

  • Linux Ubuntu 14.04 LTS 安装BLAS和LAPACk
$ sudo apt-get install libatlas-dev liblapack-dev liblapacke-dev
  • windows MSYS2环境
$ pacman -S mingw64/mingw-w64-x86_64-openblas
  • 或者从GitHub下载 BLAS和LAPACk参考实现并从源代码编译库

0.3.5.2 消息传递接口(MPI)

  • Ubuntu 14.04 LTS 安装OpenMPI
$ sudo apt-get install openmpi-bin libopenmpi-dev
  • 可以从https://www.open-mpi.org/software/ 下载OpenMPI源码并编译

0.3.5.3 线性代数模板库

  • GNU/Linux和macOS上安装Eigen
$ eigen_version="3.3.4"
$ mkdir -p eigen
$ curl -Ls http://bitbucket.org/eigen/eigen/get/${eigen_version}.tar.gz | tar -xz -C eigen --strip-components=1
$ cd eigen
$ cmake -H. -Bbuild_eigen -
DCMAKE_INSTALL_PREFIX="$HOME/Deps/eigen" &> /dev/null
$ cmake --build build_eigen -- install &> /dev/null

0.3.5.4 Boost库

  • Ubuntu 14.04 LTS
$ sudo apt-get install libboost-filesystem-dev libboost-python-dev libboost-test-dev
  • Windows
    • 二进制发行版 从Boost网站 http://www.boost.org 下载
    • https://www.boost.org 下载源代码编译
0.3.5.5 交叉编译器
  • 类Debian/Ubuntu系统,安装交叉编译器
$ sudo apt-get install gcc-mingw-w64 g++-mingw-w64 gfortran-mingw-w64
0.3.5.6 ZeroMQ, pkg-config, UUID和Doxygen
  • Ubuntu 14.04 LTS
$ sudo apt-get install pkg-config libzmq3-dev doxygen graphviz-dev uuid-dev
  • Windows MSYS2环境
$ pacman -S mingw64/mingw-w64-x86_64-zeromq
$ pacman -S mingw64/mingw-w64-x86_64-pkg-config
$ pacman -S mingw64/mingw-w64-x86_64-doxygen
$ pacman -S mingw64/mingw-w64-x86_64-graphviz
0.3.5.7 Conda的构建和部署
  • GNU/Linux和macOS上安装Conda构建和部署工具
$ conda install --yes --quiet conda-build anaconda-client jinja2 setuptools
$ conda clean -tipsy
$ conda info -a
  • Windows
$conda_path = "C:\Deps\conda\Scripts\conda.exe"
$args = "install --yes --quiet conda-build anaconda-client jinja2 setuptools"
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
$args = "clean -tipsy"
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
$args = "info -a"
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru

0.4 测试环境

  • 示例持续集成测试

    • GNU/Linux和macOS Travis( https://travis-ci.org )
      • 配置文件: travis.yml ;其他脚本 testing/dependencies
      • GNU/Linux :CMake 3.5.2和CMake 3.12.1 ;macOS :CMake 3.12.1
    • Windows Appveyor( https://www.appveyor.com )
      • .appveyor.yml ;其他脚本 testing/dependencies
      • CMake 3.11.3
    • GNU/Linux测试和商业编译器 CircleCI ( https://circleci.com )
      • .circleci/config.yml
      • CMake 3.12.1
  • 测试机制 python脚本

    • 包含在testing文件夹中
    • 脚本collect_tests.py
      • 运行测试并报告它们的状态
      • 示例可以单独测试,也可以批量测试
    • collect_tests.py
      • 接受正则表达式作为命令行输入
$ pipenv run python testing/collect_tests.py 'chapter-0[1,7]/recipe-0[1,2,5]'
  • 更详细的输出,可设置环境变量VERBOSE_OUTPUT=ON
$ env VERBOSE_OUTPUT=ON pipenv run python testing/collect_tests.py 'chapter-*/recipe-*'

0.5 上报问题并提出改进建议

  • 问题反馈
    • https://github.com/dev-cafe/cmake-cookbook/issues
  • 对源码进行贡献
    • Fork原始库 ,Pull Request提交更改
    • 原始库: https://github.com/dev-cafe/cmake-cookbook
    • 参考: https://help.github.com/articles/creating-a-pull-request-from-a-fork/
  • 非重要更改在Pull Request前创建问题描述并讨论要更改的问题
    • https://github.com/devcafe/cmake-cookbook/issues
http://www.yayakq.cn/news/300701/

相关文章:

  • 做微信公众号微网站重庆网站建设外包哪家好
  • 网站建设 慕课东营网站开发招聘
  • 做推广网站排名网络合同怎么签有效
  • 张家界网站建设app豫建设标 网站
  • 建设营销型网站的优势icp备案网站接入信息怎么填
  • 中山市交通建设发展集团网站wordpress链接自动加斜杠
  • 昆明网站开发建网站qq访客记录原理
  • 树莓派做网站服务器怎样广告牌设计效果图
  • 官网设计比较好看的网站网站建设底部
  • 网站建设绩效目标网站服务器怎么更换
  • 人力外包网站微信怎么开店铺
  • 公司网站建设前期方案导购网站开发
  • 清河做网站哪家便宜固安做网站的
  • 设计网站官网入口云商城
  • 上海闵行网站建设食品包装设计公司
  • 网站要有可留言功能 怎么做上海平面设计公司排名
  • 建设企业网站可信度的具体策略优化网站推广排名
  • 手机网站模板 怎样做长沙网站定制开发建设
  • 网站做可信认证多少钱怎么开设网站 优帮云
  • 东莞网站推广渠道phpcms二级栏目文章列表调用网站最新文章的方法
  • 长春网站建设同信郑州网站推广平台
  • 大型企业网站建设东莞莞城网站建设
  • 网站恶意镜像网站首页结构
  • 门户网站建设费网站手机端制作软件
  • 网站开发技术工作室哪里网站可以做微信头像
  • 高档网站设计公司wordpress可以做表单吗
  • 视频资源的网站怎么做建筑工程公司名字大全集
  • 做的网站上更改内容改怎么回事muse cc 做网站
  • 企业自建站中国网警中心官网
  • 外贸怎么上国外的网站做网站怎么加水平线