Przeglądaj źródła

Merge pull request #110324 from van800/shakhov/platform_toolset

Improve the CPP dialect selection for Rider, when MSVC is not used
Thaddeus Crews 1 miesiąc temu
rodzic
commit
6a1a86261f
1 zmienionych plików z 11 dodań i 3 usunięć
  1. 11 3
      misc/msvs/nmake.substitution.props

+ 11 - 3
misc/msvs/nmake.substitution.props

@@ -1,10 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-      <!-- override the PlatformToolset, which is set in the godot.vcxproj-->
-      <!-- Unknown matches to a set of conservative rules for the code analysis-->
-    <PlatformToolset>Unknown</PlatformToolset>
     <LocalDebuggerCommand Condition="'$(LocalDebuggerCommand)' == ''">$(NMakeOutput)</LocalDebuggerCommand>
+
+    <!-- Possible values: V143, Clang_Mac, Clang_Linux, llvm, Clang, ClangCL, MSFS, Unknown-->
+    <!-- Select toolset based on target GodotPlatform. Switches Cpp dialect -->
+    <PlatformToolset Condition="'$(GodotPlatform)'=='windows'">v143</PlatformToolset>
+    <PlatformToolset Condition="'$(GodotPlatform)'=='macos' or '$(GodotPlatform)'=='ios'">Clang_Mac</PlatformToolset>
+    <PlatformToolset Condition="'$(GodotPlatform)'=='linux'">Clang_Linux</PlatformToolset>
+    <PlatformToolset Condition="'$(GodotPlatform)'=='android'">Clang_Linux</PlatformToolset>
+    <PlatformToolset Condition="'$(GodotPlatform)'=='web'">Clang_Linux</PlatformToolset>
+    <!-- Fallback -->
+    <PlatformToolset Condition="'$(PlatformToolset)'==''">Unknown</PlatformToolset>
+
   </PropertyGroup>
   <!-- Build/Rebuild/Clean targets for NMake are defined in MSVC, so we need to provide them, when using MSBuild without MSVC targets -->
   <Target Name="Build">