3.7.1 broke support for Microsoft Windows SDK for Windows 7
I try to build simple project using version 3.7.1-win64-x64 in windows 7 64 bit with windows SDK 7.1 installed (no visual studio 2010 installed)
The demo project is available at: http://pastebin.com/EFfj4yX3, and the attach contain all source and generated files.
In the shortcut "Windows SDK 7.1 Command Prompt", I run the command :
cmake -G "Visual Studio 10 Win64" .
I get error:
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "C:/tutor/lab1/CMakeFiles/CMakeOutput.log".
See also "C:/tutor/lab1/CMakeFiles/CMakeError.log".
When using the version : cmake-3.6.3-win64-x64 , it success, with the result:
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/tutor/lab1
The error in CMakeError.log is dute to not finding WindowsSDKDir, as described in the following line:
"C:\tutor\lab1\CMakeFiles\3.7.1\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(PrepareForBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.
TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\tutor\lab1\CMakeFiles\3.7.1\CompilerIdC\CompilerIdC.vcxproj]