[CMake] Questions about differences between building with Ninja and VS2017

ken poole kenneth.e.poole at gmail.com
Fri Jun 23 12:37:49 EDT 2017


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?

Thanks,
-Ken P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170623/cf920461/attachment.html>


More information about the CMake mailing list