Gistrec

CMake install

Aug 21st, 2018
238
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. How can I get the latest version?
  2. Well, we can install it by following one of this methods:
  3.  
  4. Building and Installing (recommended)
  5. Uninstall the default version provided by Ubuntu's package manager:
  6.  
  7. sudo apt remove cmake
  8. sudo apt purge --auto-remove cmake
  9. Go to the official CMake webpage, then download and extract the latest version. Update the version and build variables in the following command to get the desired version:
  10.  
  11. version=3.12
  12. build=0
  13. mkdir ~/temp
  14. cd ~/temp
  15. wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
  16. tar -xzvf cmake-$version.$build.tar.gz
  17. cd cmake-$version.$build/
  18. Install the extracted source by running:
  19.  
  20. ./bootstrap
  21. make -j4
  22. sudo make install
  23. Test your new cmake version.
  24.  
  25. $ cmake --version
  26. Results of cmake --version:
  27.  
  28. cmake version 3.12.X
  29.  
  30. CMake suite maintained and supported by Kitware (kitware.com/cmake).
  31.  
  32. ????
  33. sudo ln -s /usr/local/bin/cmake /usr/bin/cmake
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment