博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu 编译 cmake
阅读量:2164 次
发布时间:2019-05-01

本文共 1738 字,大约阅读时间需要 5 分钟。

1.  下载 cmake  源文件  ,选择linux 版本

2.  在docker  linux  下  ,cd  进入文件夹  如:

cmake-3.19.8

执行文件

./bootstrap
make all -j8
sudo make install

编译完成:

-- Installing: /usr/local/share/cmake-3.19/Templates/Windows/SmallLogo44x44.png-- Installing: /usr/local/share/cmake-3.19/Templates/Windows/Windows_TemporaryKey.pfx-- Installing: /usr/local/share/cmake-3.19/Templates/Windows/Logo.png-- Installing: /usr/local/share/cmake-3.19/Templates/Windows/SmallLogo.png-- Installing: /usr/local/share/cmake-3.19/Templates/Windows/StoreLogo.png-- Installing: /usr/local/share/cmake-3.19/Templates/Windows/ApplicationIcon.png-- Installing: /usr/local/share/vim/vimfiles/indent-- Installing: /usr/local/share/vim/vimfiles/indent/cmake.vim-- Installing: /usr/local/share/vim/vimfiles/syntax-- Installing: /usr/local/share/vim/vimfiles/syntax/cmake.vim-- Installing: /usr/local/share/emacs/site-lisp/cmake-mode.el-- Installing: /usr/local/share/aclocal/cmake.m4-- Installing: /usr/local/share/bash-completion/completions/cmake-- Installing: /usr/local/share/bash-completion/completions/cpack-- Installing: /usr/local/share/bash-completion/completions/ctestroot@6f3e3db63505:/home/l1/cmake-3.19.8# cmake --versionCMake Error: Could not find CMAKE_ROOT !!!CMake has most likely not been installed correctly.Modules directory not found in/usr/local/share/cmake-3.10cmake version 3.10.2CMake suite maintained and supported by Kitware (kitware.com/cmake)

可以看到 此时 是报出错误的:

CMake Error: Could not find CMAKE_ROOT !!!CMake has most likely not been installed correctly.

执行 命令:

hash -r

可以看出结果:

root@6f3e3db63505:/home/l1/cmake-3.19.8# cmake --versioncmake version 3.19.8CMake suite maintained and supported by Kitware (kitware.com/cmake).root@6f3e3db63505:/home/l1/cmake-3.19.8# ls

显示版本正常。

转载地址:http://fkczb.baihongyu.com/

你可能感兴趣的文章
【托业】【新东方全真模拟】01~02-----P5~6
查看>>
【托业】【新东方全真模拟】03~04-----P5~6
查看>>
【托业】【新东方托业全真模拟】TEST05~06-----P5~6
查看>>
【托业】【新东方托业全真模拟】TEST09~10-----P5~6
查看>>
【托业】【新东方托业全真模拟】TEST07~08-----P5~6
查看>>
solver及其配置
查看>>
JAVA多线程之volatile 与 synchronized 的比较
查看>>
Java集合框架知识梳理
查看>>
笔试题(一)—— java基础
查看>>
Redis学习笔记(三)—— 使用redis客户端连接windows和linux下的redis并解决无法连接redis的问题
查看>>
Intellij IDEA使用(一)—— 安装Intellij IDEA(ideaIU-2017.2.3)并完成Intellij IDEA的简单配置
查看>>
Intellij IDEA使用(二)—— 在Intellij IDEA中配置JDK(SDK)
查看>>
Intellij IDEA使用(三)——在Intellij IDEA中配置Tomcat服务器
查看>>
Intellij IDEA使用(四)—— 使用Intellij IDEA创建静态的web(HTML)项目
查看>>
Intellij IDEA使用(五)—— Intellij IDEA在使用中的一些其他常用功能或常用配置收集
查看>>
Intellij IDEA使用(六)—— 使用Intellij IDEA创建Java项目并配置jar包
查看>>
Eclipse使用(十)—— 使用Eclipse创建简单的Maven Java项目
查看>>
Eclipse使用(十一)—— 使用Eclipse创建简单的Maven JavaWeb项目
查看>>
Intellij IDEA使用(十三)—— 在Intellij IDEA中配置Maven
查看>>
面试题 —— 关于main方法的十个面试题
查看>>