

It can create binary and source packages. That’s what CPack does.ĬPack will create an installer and a package for the project.

What you need is a way or tool that lets you build the project on your development machine and create a form that can be transferred and installed on another device.
#Upgrade cmake linux software
Once you have a project configured and built as we did with CMake, you need a way to build the software to make it installable.

In case of any error with the project, simply run the CMake: Debug, and it will show where the error is on the code. That’s it! You’ve successfully used the CMake tool to configure and build the project. You can do so by clicking the Build at the bottom of the screen or running CMake: Build. Open the Palette and type CMake: Configure, click the enter button, and CMake will generate the build files and configure the project. In our case, we need optimization and debugging information. MinSizeRel: it doesn’t include the debug details, but it optimizes for size.RelWithDebInfo: it includes debug info and optimizes for size.Release: no debug details, but optimization gets included.Debug: it includes the debug details, but it disables optimizations.Still on the Palette, type CMake: Select Variant. In our case, it’s GCC 9.4.0 x86_64-linux-gnu.ĬMake also uses a variant that contains instructions on building the project. On the Palette, search for Kit and choose the one that matches your version.Īt the bottom of the window, you will see the selected kit. You also need to select a Kit to inform CMake which compiler to use.įirst, check your gcc version on the terminal. You will notice two files, the main function and the CMakeLists.txt will be created. If prompted to choose between Library and Executable, choose Executable. To quickly create the needed CMake files, type CMake: Quick Start and choose the option like in the image below. Once Visual Studio Code opens, open the Palette by typing ctrl + shift + p
