Last active
May 22, 2022 17:32
-
-
Save schellingb/6546701804c15aa4104d44331482e0f1 to your computer and use it in GitHub Desktop.
A short and readable single .vcxproj file that opens and builds in Visual Studio 2012, 2013, 2015, 2017 and 2019 with good default settings.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="DisplayText"> | |
<PropertyGroup Label="UserMacros"> | |
<VisualStudioYear Condition="'$(VisualStudioVersion)' == '11.0' Or '$(PlatformToolsetVersion)' == '110' Or '$(MSBuildToolsVersion)' == '4.0'">2012</VisualStudioYear> | |
<VisualStudioYear Condition="'$(VisualStudioVersion)' == '12.0' Or '$(PlatformToolsetVersion)' == '120' Or '$(MSBuildToolsVersion)' == '12.0'">2013</VisualStudioYear> | |
<VisualStudioYear Condition="'$(VisualStudioVersion)' == '14.0' Or '$(PlatformToolsetVersion)' == '140' Or '$(MSBuildToolsVersion)' == '14.0'">2015</VisualStudioYear> | |
<VisualStudioYear Condition="'$(VisualStudioVersion)' == '15.0' Or '$(PlatformToolsetVersion)' == '141' Or '$(MSBuildToolsVersion)' == '15.0'">2017</VisualStudioYear> | |
<VisualStudioYear Condition="'$(VisualStudioVersion)' == '16.0' Or '$(PlatformToolsetVersion)' == '142' Or '$(MSBuildToolsVersion)' == '16.0'">2019</VisualStudioYear> | |
<VisualStudioYear Condition="'$(VisualStudioVersion)' == '17.0' Or '$(PlatformToolsetVersion)' == '143' Or '$(MSBuildToolsVersion)' == '17.0'">2022</VisualStudioYear> | |
<VisualStudioYear Condition="'$(VisualStudioYear)' == ''">9999</VisualStudioYear> | |
</PropertyGroup> | |
<Target Name="DisplayText"> | |
<Message Importance="high" Text="Building configuration $(Configuration) for platform $(Platform) with Visual Studio $(VisualStudioYear) ..." /> | |
</Target> | |
<ItemGroup Label="ProjectConfigurations"> | |
<ProjectConfiguration Include="Debug|Win32"> | |
<Configuration>Debug</Configuration> | |
<Platform>Win32</Platform> | |
</ProjectConfiguration> | |
<ProjectConfiguration Include="Debug|x64"> | |
<Configuration>Debug</Configuration> | |
<Platform>x64</Platform> | |
</ProjectConfiguration> | |
<ProjectConfiguration Include="Release|Win32"> | |
<Configuration>Release</Configuration> | |
<Platform>Win32</Platform> | |
</ProjectConfiguration> | |
<ProjectConfiguration Include="Release|x64"> | |
<Configuration>Release</Configuration> | |
<Platform>x64</Platform> | |
</ProjectConfiguration> | |
</ItemGroup> | |
<PropertyGroup Label="Globals"> | |
<ProjectName>MyProject</ProjectName> | |
<ProjectGuid>{FFFFFFFF-FFFF-4FFF-FFFF-FFFFFFFFFFFF}</ProjectGuid> | |
</PropertyGroup> | |
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | |
<PropertyGroup Label="Configuration"> | |
<ConfigurationType>Application</ConfigurationType> | |
<PlatformToolset Condition="'$(VisualStudioYear)' == '2012'">v110_xp</PlatformToolset> | |
<PlatformToolset Condition="'$(VisualStudioYear)' == '2013'">v120_xp</PlatformToolset> | |
<PlatformToolset Condition="'$(VisualStudioYear)' == '2015'">v140</PlatformToolset> | |
<PlatformToolset Condition="'$(VisualStudioYear)' == '2017'">v141</PlatformToolset> | |
<PlatformToolset Condition="'$(VisualStudioYear)' == '2019'">v142</PlatformToolset> | |
<PlatformToolset Condition="'$(VisualStudioYear)' == '2022'">v143</PlatformToolset> | |
<PlatformToolset Condition="'$(VisualStudioYear)' == '9999'">$(DefaultPlatformToolset)</PlatformToolset> | |
<UseOfMfc>false</UseOfMfc> | |
<CharacterSet>MultiByte</CharacterSet> | |
<WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization> | |
<UseDebugLibraries Condition="'$(Configuration)'=='Debug'">true</UseDebugLibraries> | |
</PropertyGroup> | |
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | |
<ImportGroup Label="PropertySheets"> | |
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |
</ImportGroup> | |
<PropertyGroup> | |
<OutDir Condition="'$(Platform)'=='x64'">$(Configuration)\64bit\</OutDir> | |
<OutDir Condition="'$(Platform)'=='Win32'">$(Configuration)\32bit\</OutDir> | |
<IntDir>$(OutDir)</IntDir> | |
<TLogLocation>$(OutDir)</TLogLocation> | |
<IntermediateOutputPath>$(OutDir)</IntermediateOutputPath> | |
<GenerateManifest>false</GenerateManifest> | |
<LinkIncremental Condition="'$(Configuration)'=='Debug'">true</LinkIncremental> | |
<LinkIncremental Condition="'$(Configuration)'=='Release'">false</LinkIncremental> | |
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | |
</PropertyGroup> | |
<ItemDefinitionGroup> | |
<ClCompile> | |
<BufferSecurityCheck>false</BufferSecurityCheck> | |
<WarningLevel>Level3</WarningLevel> | |
<SuppressStartupBanner>true</SuppressStartupBanner> | |
<ExceptionHandling>false</ExceptionHandling> | |
<RuntimeTypeInfo>false</RuntimeTypeInfo> | |
<PreprocessorDefinitions>WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
<PreprocessorDefinitions Condition="'$(Configuration)'=='Debug'">_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
<PreprocessorDefinitions Condition="'$(Configuration)'=='Release'">NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">WIN64;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |
</ClCompile> | |
<ClCompile Condition="'$(Configuration)'=='Debug'"> | |
<Optimization>Disabled</Optimization> | |
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | |
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | |
</ClCompile> | |
<ClCompile Condition="'$(Configuration)'=='Release'"> | |
<Optimization>Full</Optimization> | |
<StringPooling>true</StringPooling> | |
<IntrinsicFunctions>true</IntrinsicFunctions> | |
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> | |
<FunctionLevelLinking>true</FunctionLevelLinking> | |
<OmitFramePointers>true</OmitFramePointers> | |
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | |
<WholeProgramOptimization>true</WholeProgramOptimization> | |
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> | |
<FloatingPointExceptions>false</FloatingPointExceptions> | |
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">StreamingSIMDExtensions2</EnableEnhancedInstructionSet> | |
<AdditionalOptions Condition="'$(VisualStudioYear)' >= '2013'">/Gw %(AdditionalOptions)</AdditionalOptions> | |
</ClCompile> | |
<Link> | |
<SuppressStartupBanner>true</SuppressStartupBanner> | |
<GenerateDebugInformation>true</GenerateDebugInformation> | |
<SubSystem>Console</SubSystem> | |
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> | |
</Link> | |
<Link Condition="'$(Configuration)'=='Release'"> | |
<EnableCOMDATFolding>true</EnableCOMDATFolding> | |
<OptimizeReferences>true</OptimizeReferences> | |
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> | |
<IgnoreEmbeddedIDL>true</IgnoreEmbeddedIDL> | |
<GenerateWindowsMetadata>false</GenerateWindowsMetadata> | |
</Link> | |
</ItemDefinitionGroup> | |
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | |
<ItemGroup> | |
<ClCompile Include="main.cpp" /> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment