这篇文章主要介绍了redhat 6.8如何升级默认cmake 2.8到cmake 3.9,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

cmake 3.9安装介质

https://cmake.org/files/上传 cmake 3.9安装介质

[root@mysql8018~]#mkdir-pcmake_new_dir[root@mysql8018cmake_new_dir]#ll总用量7524-rw-r--r--.1rootroot770377712月213:57cmake-3.9.2.tar.gz解压cmake 3.9安装介质

[root@mysql8018cmake_new_dir]#tar-zxvfcmake-3.9.2.tar.gz获取cmake 3.9安装指令

[root@mysql8018cmake-3.9.2]#moreREADME.rstUNIX/MacOSX/MinGW/MSYS/Cygwin^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Youneedtohaveacompilerandamakeinstalled.Runthe``bootstrap``scriptyoufindinthesourcedirectoryofCMake.Youcanusethe``--help``optiontoseethesupportedoptions.Youmayusethe``--prefix=<install_prefix>``optiontospecifyacustominstallationdirectoryforCMake.Youcanrunthe``bootstrap``scriptfromwithintheCMakesourcedirectoryoranyotherbuilddirectoryofyourchoice.Oncethishasfinishedsuccessfully,run``make``and``makeinstall``.Insummary::$./bootstrap&&make&&makeinstall执行cmake 3.9 bootstrap

[root@mysql8018cmake_new_dir]#ll总用量7528drwxr-xr-x.11rootroot409612月213:58cmake-3.9.2-rw-r--r--.1rootroot770377712月213:57cmake-3.9.2.tar.gz[root@mysql8018cmake_new_dir]#cdcmake-3.9.2[root@mysql8018cmake-3.9.2]#ll总用量284drwxr-xr-x.4502games40969月82017Auxiliary-rwxr-xr-x.1502games483369月82017bootstrap-rw-r--r--.1502games97069月82017CMakeCPack.cmake-rw-r--r--.1502games128979月82017CMakeCPackOptions.cmake.in-rw-r--r--.1502games1539月82017CMakeGraphVizOptions.cmake-rw-r--r--.1502games317219月82017CMakeLists.txt-rw-r--r--.1502games44819月82017CMakeLogo.gif-rw-r--r--.1502games7909月82017cmake_uninstall.cmake.in-rw-r--r--.1502games33229月82017CompileFlags.cmake-rwxr-xr-x.1502games999月82017configure-rw-r--r--.1502games18519月82017CONTRIBUTING.rst-rw-r--r--.1502games50189月82017Copyright.txt-rw-r--r--.1502games4409月82017CTestConfig.cmake-rw-r--r--.1502games62139月82017CTestCustom.cmake.in-rw-r--r--.1502games3749月82017DartConfig.cmake-rw-r--r--.1502games280469月82017doxygen.configdrwxr-xr-x.18502games40969月82017Helpdrwxr-xr-x.2502games40969月82017Licensesdrwxr-xr-x.12502games204809月82017Modulesdrwxr-xr-x.3502games40969月82017Packaging-rw-r--r--.1502games30169月82017README.rstdrwxr-xr-x.11502games368649月82017Sourcedrwxr-xr-x.4502games40969月82017Templatesdrwxr-xr-x.240502games122889月82017Testsdrwxr-xr-x.21502games40969月82017Utilities[root@mysql8018cmake-3.9.2]#./bootstrap--prefix=/usr略--PerformingTestrun_inlines_hidden_test--PerformingTestrun_inlines_hidden_test-Success--Configuringdone--Generatingdone--Buildfileshavebeenwrittento:/root/cmake_new_dir/cmake-3.9.2---------------------------------------------CMakehasbootstrapped.Nowrungmake.[root@mysql8018cmake-3.9.2]#执行make

[root@mysql8018cmake-3.9.2]#make略[100%]LinkingCexecutablepseudo_tidy[100%]Builttargetpseudo_tidyScanningdependenciesoftargetfoo[100%]BuildingCXXobjectTests/FindPackageModeMakefileTest/CMakeFiles/foo.dir/foo.cpp.o[100%]LinkingCXXstaticlibrarylibfoo.a[100%]Builttargetfoo[root@mysql8018cmake-3.9.2]#执行make install

[root@mysql8018cmake-3.9.2]#makeinstall略--Installing:/usr/share/cmake-3.9/editors/emacs/cmake-mode.el--Installing:/usr/share/aclocal/cmake.m4--Installing:/usr/share/cmake-3.9/completions/cmake--Installing:/usr/share/cmake-3.9/completions/cpack--Installing:/usr/share/cmake-3.9/completions/ctest验证cmake 3.9

[root@mysql8018cmake-3.9.2]#cmake-versioncmakeversion3.9.2CMakesuitemaintainedandsupportedbyKitware(kitware.com/cmake).

感谢你能够认真阅读完这篇文章,希望小编分享的“redhat 6.8如何升级默认cmake 2.8到cmake 3.9”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,更多相关知识等着你来学习!