…but lazy as I am, there is a much more convenient way. Yes, you could start your terminal of choice and navigate to the vcvarsall.bat file… There is nothing you can do if the environment has not been properly setup, as neither of Ninja or CMake will be able to find the MSVC compilers. Really, this is the most important step of them all. So how do we set it up? Well, it is actually quite straight forward and does not require many steps. There will be no more excuses to go for a coffee break after this. It is ridiculously fast since it enables the user to utilize multiple cores to effectively handle parallel builds. This as you probably can imagine can save tremendous time for us. If we ever change the CMakeList of our project, Ninja will rerun CMake for us the next time we build the project. If you have not heard about it before, Ninja is a small build system focusing on speed and it is also quite smart – Ninja and CMake are completely synced when it comes to actual changes in the project, so you will never have to worry about rebuilding unchanged files. ![]() #Cmake install windows generator#For the last couple of months, I have been using Ninja as my CMake generator at work and I have only good things to say about it. Regardless, the choice of a CMake generator can have a significant impact on build times. I am rather new to CMake myself so if you ask me again in a couple of years what I think about it, I might have more insightful comments to make. I will let you be the judge of that since I am not an expert on this matter. “It’s not good, but there is nothing better out there so everyone is using it anyway” In fact, I would like to quote one of my colleagues stating his opinion on the whole thing: At that point you are surely already using CMake, swearing and screaming at the top of your lungs. Today I would like to just drop a quick tip for anyone out there tired of long building times as project complexity grows beyond that of your regular hobby project.
0 Comments
Leave a Reply. |
AuthorDerek ArchivesCategories |