Questions about differences between building with Ninja and VS2017

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Questions about differences between building with Ninja and VS2017

ken poole
In our environment we have:
CMake 3.8.1
VS Enterprise 2017 15.1 (26403.7)
Ninja 1.7.2

Since we are building on Win Server 2012R2 and targeting Win7 we do define the MS macros (_WIN32_WINNT, WINVER, _WIN32_WINDOWS, NTDDI_VERSION) to ensure we only get access to the features that Win7 has.

When we look at the "MS include directories" in Visual Studio it shows as referencing the Windows Kits\8.1 include directories
When we run with Ninja, we run in a cmd window that is titled "x64 Native Tools Command Prompt for VS 2017" - and the includes in its environment variables are the Windows Kits\10.0 ones.

Is there a way to have CMake generate for Ninja so it uses the same "Windows Kits" directory as MSVS does? We have tried setting CMAKE_SYSTEM_VERSION to 6.1. That doesn't seem to have made a difference.  What is that supposed to change in a Ninja/MSVS  build?

Are there some other settings we should be making to ensure the Ninja and the MSVS builds work from the same directories?

-Ken P.


Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: