diff options
author | Gilles Khouzam <gillesk@microsoft.com> | 2017-01-27 21:50:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-01-31 14:00:20 (GMT) |
commit | 435cebaaa1663274cbe43c19cb8244011b6d1384 (patch) | |
tree | f4244fdfc71e7a7ea1a08ccd6956ffc49fead773 /Modules/CompilerId | |
parent | 325c6153088c673569971958f107f6cb97b67c50 (diff) | |
download | CMake-435cebaaa1663274cbe43c19cb8244011b6d1384.zip CMake-435cebaaa1663274cbe43c19cb8244011b6d1384.tar.gz CMake-435cebaaa1663274cbe43c19cb8244011b6d1384.tar.bz2 |
VS: Fix CSharp compiler identification for VS 2017
The CSharp compiler for VS 2017 has moved from `MSBuildTools` to
`RoslynTargets`. Account for both locations giving priority to the
`MSBuildTools` location.
Diffstat (limited to 'Modules/CompilerId')
-rw-r--r-- | Modules/CompilerId/VS-10.csproj.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/CompilerId/VS-10.csproj.in b/Modules/CompilerId/VS-10.csproj.in index 833dca7..ed5e847 100644 --- a/Modules/CompilerId/VS-10.csproj.in +++ b/Modules/CompilerId/VS-10.csproj.in @@ -47,9 +47,9 @@ </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> - <PostBuildEvent>cd /D "$(MSBuildToolsPath)" -if not %errorlevel%==0 exit -1 -if not exist @id_cl@ exit -2 -%40echo CMAKE_@id_lang@_COMPILER=$(MSBuildToolsPath)\@id_cl@</PostBuildEvent> + <PostBuildEvent>if not "$(RoslynTargetsPath)"=="" if exist "$(RoslynTargetsPath)\@id_cl@" set _CSC=$(RoslynTargetsPath) +if exist "$(MSBuildToolsPath)\@id_cl@" set _CSC=$(MSBuildToolsPath) +if "%_CSC%"=="" exit -1 +%40echo CMAKE_@id_lang@_COMPILER=%_CSC%\@id_cl@</PostBuildEvent> </PropertyGroup> </Project> |