question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] CMakeToolchain in combination with visual studio won't allow the Ninja generator?

See original GitHub issue

I want to use the CMakePresets with Visual studio 2022 and use a native CMake project with Ninja generator.

However, using CMakeToolchain, I am unable to get the Ninja generator. The CMakePresets.json always has the Visual Studio generator, even with [conf] tools.cmake.cmaketoolchain:generator=Ninja and/or [general] cmake_generator = Ninja.

I tried, conan 1.50, 1.51 and 1.52.beta but with all the same result. Is it possible to enable Ninja and how should that be done?

(I tried to change it manually to Ninja, but in that case cmake fails with a platform error).

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
memshardedcommented, Aug 9, 2022

The configuration in conan.conf is not used by the new generators, only the one from global.conf and profiles [conf]. conan.conf dissapears in 2.0, it is recommended to migrate to global.conf configuration.

0reactions
edwardvandevorst-philipscommented, Aug 9, 2022

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

CMake integration with Ninja generator fails to find the right ...
When I switch the generator using the CMakeSettings.json to Visual Studio 15 2017 everything works as expected but Ninja doesn't.
Read more >
Configure and build with CMake Presets in Visual Studio
Use external with command-line generators like Ninja. These values allow vendors like Visual Studio to supply the required environment before ...
Read more >
vscode-cmake-tools/support - Gitter
preferredGenerators": ["Ninja"],. but when I call "build" in Visual Studio Code, it tries to configure the project again, invalidates the CMake cache and...
Read more >
Question about Visual Studio Community configuration
Are you aware of the emcmake wrapper tool, and the cmake toolchain file in the Emscripten SDK? Those can help with building cmake...
Read more >
Visual Studio, CMake and Toolchain Files - Stack Overflow
Minor comment please limit questions to 1 question in the future. Multiple questions clutters questions and makes search results worse.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found