summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2017-08-11 15:33:39 +0200
committerDamien George <damien.p.george@gmail.com>2019-09-18 22:14:11 +1000
commit94873a48263d5923ba0640900b801b13fcd309d7 (patch)
tree1e749b6144d62ca0a8d081139c93bfcb6486733b
parentb2b21839d374e480b900e102cfd0010233b43543 (diff)
windows/msvc: Move build options from .vcxproj to .props files.
We want the .vcxproj to be just a container with the minimum content for making it work as a project file for Visual Studio and MSBuild, whereas the actual build options and actions get placed in separate reusable files. This was roughly the case already except some compiler options were overlooked; fix this here: we'll need those common options when adding a project file for building mpy-cross.
-rw-r--r--ports/windows/micropython.vcxproj10
-rw-r--r--ports/windows/msvc/common.props1
-rw-r--r--ports/windows/msvc/debug.props2
-rw-r--r--ports/windows/msvc/release.props5
4 files changed, 7 insertions, 11 deletions
diff --git a/ports/windows/micropython.vcxproj b/ports/windows/micropython.vcxproj
index ee0b98abb..e468cfdae 100644
--- a/ports/windows/micropython.vcxproj
+++ b/ports/windows/micropython.vcxproj
@@ -25,29 +25,19 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/ports/windows/msvc/common.props b/ports/windows/msvc/common.props
index 5fe1b45fe..6735f96d7 100644
--- a/ports/windows/msvc/common.props
+++ b/ports/windows/msvc/common.props
@@ -8,6 +8,7 @@
<OutDir>$(PyOutDir)</OutDir>
<IntDir>$(PyIntDir)</IntDir>
<PyFileCopyCookie>$(PyBuildDir)copycookie$(Configuration)$(Platform)</PyFileCopyCookie>
+ <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
diff --git a/ports/windows/msvc/debug.props b/ports/windows/msvc/debug.props
index fa1ca4fcb..5ae9d64fc 100644
--- a/ports/windows/msvc/debug.props
+++ b/ports/windows/msvc/debug.props
@@ -3,6 +3,8 @@
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
diff --git a/ports/windows/msvc/release.props b/ports/windows/msvc/release.props
index ea0bf433d..a3fbe2494 100644
--- a/ports/windows/msvc/release.props
+++ b/ports/windows/msvc/release.props
@@ -2,7 +2,10 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
- <PropertyGroup />
+ <PropertyGroup>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
<ItemDefinitionGroup>
<Link>
<OptimizeReferences>true</OptimizeReferences>