conan-io / docs

conan.io reStructuredText documentation
http://docs.conan.io
MIT License
104 stars 356 forks source link

Improve how to use CMake and Ninja as generator #3767

Open uilianries opened 3 months ago

uilianries commented 3 months ago

Few years ago I answered a question in Stackoverflow (Sorry Memsharded, I had that one!)

https://stackoverflow.com/questions/71548337/how-to-choose-ninja-as-cmake-generator-with-conan/71613990#71613990

However, past few weeks it has been marked as useful. And, it's was an answer more focused in Conan 1.x (because the question was about Conan 1.x).

Checking the documentation, we have few references about Ninja: https://docs.conan.io/2/search.html?q=ninja&check_keywords=yes&area=default

So it would be great if we could add a small example using CMake + Ninja in https://docs.conan.io/2/examples/tools/cmake/cmake.html and use it as reference. Personally, I use Ninja by default in my environments.

We could show passing via recipe generator="Ninja" and configuration.