-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toolchains don't find VS Ninja install #99
Comments
Thanks for filing the issue, @aozgaa, and for the fix! I actually split out the 'ninja download' piece out of WindowsToolchain a short time ago - it's discussed in #65, and then implemented in #66. That means that WindowsToolchain is purely a CMake toolchain, and optional things - like Ninja download - got moved to MarkSchofield/WindowsCMake. Teaching MarkSchofield/WindowsCMake about the Visual Studio distributed ninja seems reasonable. |
I wasn't aware that the generator doesn't fit in the toolchain, nor had I seen the WindowsCMake repo previously. On reflection this makes conceptual sense though. Toolchains and generators seem to be orthogonal in the cmake documentation: cmake-toolchains(7) and cmake-generators(7). As a partical matter then, in order to drive build with ninja on windows, a user would either need to Does that sound right? As an implementation complication -- in order to find Can you advise on how you'd like that done? |
Sorry! In order to bring more focus (and less churn) to WindowsToolchain, I added a stricter definition of responsibilities.
Yes. To add context:
include(${WINDOWSCMAKE_DIR}/Ninja.cmake)
At the minute, WindowsCMake does rely on CMake variables from WindowsToolchain - for example, for midl.exe invocation, WindowsCMake's
So it's a bit tricky. Since my goal with WindowsToolchain was to lower the barrier to entry for using CMake on Windows, by making it more Linux/Unix/MacOS-like, and in those cases, a user would be expected to have the 'generator' installed already, I'm not sure it's worth heroics to get this working. |
I've sent a PR with an alternate fix: #120. This fixes the problem for me, without growing the scope of the WindowsToolchain project. |
Closed with #120. |
Building on my Win10 machine yield errors like this for all generators:
This can be fixed by using the
ninja.exe
included with Visual Studio (Build Tools). On my machine with default install paths, it is located at:Or in terms of the cmake variables in the toolchain files:
A sample patch that searches for the VS install of ninja is available at aozgaa@0ec36e1
The text was updated successfully, but these errors were encountered: