Cmake tips and tricks: Difference between revisions
Jump to navigation
Jump to search
(Add categories: Linux, Reference) |
|||
| Line 37: | Line 37: | ||
== References == | == References == | ||
<references /> | <references /> | ||
[[Category:Linux]] | |||
[[Category:Reference]] | |||
Revision as of 00:55, 15 July 2026
Build cmake from source[1]
#If another version if cmake is installed, uninstall it. A compiler such as g++ must be installed.
sudo apt remove cmake
#Install prerequisite
sudo apt install libssl-dev
# Download the latest archive from https://cmake.org/download/
# Extract, build and install.
tar -zxvf cmake-x.yy.z.tar.gz
cd cmake-x.yy.z
./bootstrap
make -j $(nproc)
sudo make install
sudo ldconfig
CMake x.yy or higher is required[2]
# Install latest cmake
$apt remove cmake -y
$pip install cmake --upgrade
# Or specific version
sudo pip install cmake==3.22
# Find location of cmake and crate symbolic link to default /usr/bin folder
# or add cmake location in your environment path
sudo ln -s /usr/local/bin/cmake /usr/bin/cmake