Explorar el Código

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.
Gilles Khouzam hace 9 años
padre
commit
435cebaaa1
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      Modules/CompilerId/VS-10.csproj.in

+ 4 - 4
Modules/CompilerId/VS-10.csproj.in

@@ -47,9 +47,9 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
-    <PostBuildEvent>cd /D &quot;$(MSBuildToolsPath)&quot;
-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>