diff options
author | Johan Lorensson <lateralusx.github@gmail.com> | 2018-09-07 01:45:35 +0300 |
---|---|---|
committer | Ludovic Henry <luhenry@microsoft.com> | 2018-09-07 01:45:35 +0300 |
commit | 4acd1419c81c1caac8004b10198ef51ad1377526 (patch) | |
tree | bca2f186980765a8146790594bfdae441064f2eb /msvc/libmono-static.vcxproj | |
parent | 16f554307f57418711d2c80bb621f7221117ce1b (diff) |
Add C++ compiler support option for some msvc build projects. (#10487)
By default, all projects are build using "default" compiler based on source
file extension. There is a property in mono.props, MONO_COMPILE_AS_CPP
that could change this and build selected projects (eglib, libgcmonosgen,
libmini, libmono-dynamic, libmono-static, libmonodac, libmonoruntime,
libmonoutils, mono, monodis, monograph and pedump) using C++ compiler.
MONO_COMPILE_AS_CPP property could be set when calling msbuild
or through VS property manager IDE. Default value is false building using
"default" compiler (current behavior). When setting MONO_COMPILE_AS_CPP=true
the build prefix will be altered to make sure the C++ build gets its own build
folder, parallel to default build folders.
Example of building using C++ compiler from msbuild:
msbuild /p:PlatformToolset=v140 /p:Platform=x64 /p:Configuration=Release /p:MONO_TARGET_GC=sgen /p:MONO_COMPILE_AS_CPP=true msvc/mono.sln
Diffstat (limited to 'msvc/libmono-static.vcxproj')
-rw-r--r-- | msvc/libmono-static.vcxproj | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/msvc/libmono-static.vcxproj b/msvc/libmono-static.vcxproj index 0c606ddb6af..19e7071fc10 100644 --- a/msvc/libmono-static.vcxproj +++ b/msvc/libmono-static.vcxproj @@ -194,6 +194,11 @@ <LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(MONO_COMPILE_AS_CPP)'=='true'">
+ <ClCompile>
+ <CompileAs>CompileAsCpp</CompileAs>
+ </ClCompile>
+ </ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="eglib.vcxproj">
<Project>{158073ed-99ae-4196-9edc-ddb2344f8466}</Project>
|