I personally like Ninja as a build system as it is fast, easy to use since it is a single config system and integrates well with CLion, which is my cross-platform C++ IDE of choice – but there is no right or wrong here. I’d recommend to specify the generator manually by default. Here is a full list of all generators cmake-generators(7) - CMake 3.24.2 Documentation If you want to create an Xcode project on Mac, run cmake -G Xcode on macOS, if you want to create a visual studio 2022 project, run cmake -G "Visual Studio 17 2022" and so on. via choco on your Windows machine and use Ninja to build your project. Then you can install ninja via homebrew on your Mac and e.g. Now if you want CMake to output a ninja project, call cmake -G Ninja. When you execute the cmake command on unix systems without specifying a generator, it will generate a unix makefile by default, on Windows it will try to figure out if you have installed visual studio and create a visual studio project or will switch to nmake otherwise. If you don’t do that, CMake will chose whatever generator it think is appropriate. You can instruct CMake which kind of build system you are using with the -G flag – this is called the generator in the CMake world. It’s the other way round, when invoking the cmake command you generate a project for some kind of build system from the CMakeLists. Are you saying i could just install nmake or ninja? do they use the CMakeLists.txt file as their input?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |