

You can specify the build tools that you want to use for example, you can use MSVC or LLVM on Windows, and gnu or LLVM on Unix-like systems, including Linux, OSX, and MSYS or MinGW. Because it can be called from the command line, it integrates well with continuous integration/continuous build systems. It can even create make files if you want to do everything from the command line.

Similar capabilities are available for every other popular IDE. For example, CMake can generate solution (.sln) and project files (.vcxproj) that Visual Studio and Visual Studio Code use on Windows. CMake then takes that information and generates the files needed to build the system. You specify what you want done, not how to do it. Why Use CMake?ĬMake is a powerful and robust build system. Most of the information is applicable to using almost any IDE, or indeed, no IDE at all.

I will also use git and Google Test, and port the project from Windows to Linux. So I added the path on the "c_cpp_propertier.In this article and several more, I will be discussing developing a very simple C++ library and application using CMake and Visual Studio Code.

My packages are in the folder with the absolute path C:\Users\Johannes\Desktop\Masterthesis\vcpkg\vcpkg\packages Thus I am programming on Windows I can't use the "integrate" command to add the path to the includepath. The resulting tasks.json file looks like thisĪs my package manager (for blaze or other packages) i use the vspkg-git: This worked fine so I can easily compile my helloworld.cpp. GCC: gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0 || (cmd: gcc -version)įirstly I went through the VS Code tutorial for MinGW: With the MinGW GCC I can compile the testfiles of blaze successfully via cmd and thus I want to use the GCC for VS Code. I am trying to use the blaze math packages to solve quadratic programming problems. I am pretty new to programm in C++ so please don't judge my problems with setting up my "Visual Studio Code" environment.
