Skip to content

Instantly share code, notes, and snippets.

@TeddybearCrisis
Created February 10, 2019 12:48
Show Gist options
  • Save TeddybearCrisis/f144974069a997805be3fc149948f5f1 to your computer and use it in GitHub Desktop.
Save TeddybearCrisis/f144974069a997805be3fc149948f5f1 to your computer and use it in GitHub Desktop.
Enable cmake for Visual Studio 2015
@echo off
:: when cmake-gui shows the error 'CXX compiler identification unknown' when trying to use the VS 2015 generator
:: this script can help. It goes back to the following solution:
:: https://stackoverflow.com/questions/14372706/visual-studio-cant-build-due-to-rc-exe/46166632#46166632
:: The reason is that cmake-gui always ends up using the Win 10 SDK where tools are missing for VS2015
:: This script opens a console and prompts it to use the 8.1 SDK
cd "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\"
%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 8.1
start cmake-gui
“cmd /k"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment