[CMake] Fwd: Visual Studio command line from CMake
David Cole
dlrdave at aol.com
Thu Jan 9 10:35:19 EST 2014
I've got a batch file that does something like this to detect the "most
recent" available Visual Studio:
@rem ** Add "Developer Command Prompt" for VS2013, 2012 or 2010
environment:
@set _vsver=
@set _vs12env=%VS120COMNTOOLS%VsDevCmd.bat
@if "%_vsver%" equ "" if exist "%_vs12env%" set _vsver=12
@set _vs11env=%VS110COMNTOOLS%VsDevCmd.bat
@if "%_vsver%" equ "" if exist "%_vs11env%" set _vsver=11
@set _vs10env=%VS100COMNTOOLS%vsvars32.bat
@if "%_vsver%" equ "" if exist "%_vs10env%" set _vsver=10
@if "%_vsver%" equ "10" set _vsenv=%_vs10env%
@if "%_vsver%" equ "10" set _vstools=%VS100COMNTOOLS%
@if "%_vsver%" equ "11" set _vsenv=%_vs11env%
@if "%_vsver%" equ "11" set _vstools=%VS110COMNTOOLS%
@if "%_vsver%" equ "12" set _vsenv=%_vs12env%
@if "%_vsver%" equ "12" set _vstools=%VS120COMNTOOLS%
@if exist "%_vsenv%" call "%_vsenv%"
More information about the CMake
mailing list