Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/benchmark
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5e84fd73d107
Choose a base ref
...
head repository: mockingbirdnest/benchmark
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: eae05c2dab88
Choose a head ref
  • 3 commits
  • 9 files changed
  • 1 contributor

Commits on May 24, 2021

  1. Copy the full SHA
    70df99f View commit details
  2. Cdecl.

    pleroy committed May 24, 2021
    Copy the full SHA
    63ed68a View commit details
  3. Copy the full SHA
    eae05c2 View commit details
4 changes: 2 additions & 2 deletions include/benchmark/benchmark.h
Original file line number Diff line number Diff line change
@@ -1310,13 +1310,13 @@ class Fixture : public internal::Benchmark {

// Helper macro to create a main routine in a test that runs the benchmarks
#define BENCHMARK_MAIN() \
int main(int argc, char** argv) { \
int __cdecl main(int argc, char** argv) { \
::benchmark::Initialize(&argc, argv); \
if (::benchmark::ReportUnrecognizedArguments(argc, argv)) return 1; \
::benchmark::RunSpecifiedBenchmarks(); \
return 0; \
} \
int main(int, char**)
int __cdecl main(int, char**)

// ------------------------------------------------------
// Benchmark Reporters
116 changes: 116 additions & 0 deletions msvc/benchmark.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<!--Define project configurations. Nothing interesting can happen here.-->
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>

<!--Microsoft C++ stuff.-->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

<!--Definitions.-->
<PropertyGroup>
<!--Predicates.-->
<PrincipiaCompilerClangLLVM>false</PrincipiaCompilerClangLLVM>
<PrincipiaCompilerClangLLVM Condition="$(Configuration)==Release_LLVM">true</PrincipiaCompilerClangLLVM>
<PrincipiaOptimize>false</PrincipiaOptimize>
<PrincipiaOptimize Condition="$(Configuration.StartsWith('Release'))">true</PrincipiaOptimize>
<PrincipiaMainProject>false</PrincipiaMainProject>
<PrincipiaMainProject Condition="$(ProjectName) == benchmarks or
$(ProjectName) == tests">true</PrincipiaMainProject>
<!--Dependency paths.-->
<PrincipiaDependencyConfiguration>Debug</PrincipiaDependencyConfiguration>
<PrincipiaDependencyConfiguration Condition="$(PrincipiaOptimize)">Release</PrincipiaDependencyConfiguration>
</PropertyGroup>

<!--Compiler.-->
<PropertyGroup>
<PlatformToolset>v142</PlatformToolset>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>

<!--Target.-->
<PropertyGroup>
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType Condition="$(ProjectName)=='google-benchmark-test'">Application</ConfigurationType>
</PropertyGroup>
<ItemDefinitionGroup Condition="$(ConfigurationType)==Application">
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

<!--Common options.-->
<PropertyGroup>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<CallingConvention>vectorcall</CallingConvention>
<LanguageStandard>stdcpp17</LanguageStandard>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>$(SolutionDir)\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;GOOGLEBENCHMARK_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<Lib>
<LinkTimeCodeGeneration>false</LinkTimeCodeGeneration>
</Lib>
</ItemDefinitionGroup>

<!--Debug options.-->
<PropertyGroup Condition="!$(PrincipiaOptimize)">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<ItemDefinitionGroup Condition="!$(PrincipiaOptimize)">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Disabled</Optimization>
</ClCompile>
</ItemDefinitionGroup>

<!--Release options.-->
<PropertyGroup Condition="$(PrincipiaOptimize)">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<ItemDefinitionGroup Condition="$(PrincipiaOptimize)">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>

<!--Import our property sheets.-->
<ImportGroup Label="PropertySheets">
<Import Project="windows_libraries.props" />
<Import Project="portability_macros.props" />
</ImportGroup>

<!--This import must be at the end.-->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
98 changes: 8 additions & 90 deletions msvc/google-benchmark-test.vcxproj
Original file line number Diff line number Diff line change
@@ -1,102 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{ABB7BEF8-2C48-4967-A703-7B6FB9AB831F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>googlebenchmarktest</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="windows_libraries.props" />
<Import Project="portability_macros.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="windows_libraries.props" />
<Import Project="portability_macros.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(OutDir)$(ProjectName)\</IntDir>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(OutDir)$(ProjectName)\</IntDir>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<CallingConvention>VectorCall</CallingConvention>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WholeProgramOptimization>false</WholeProgramOptimization>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<CallingConvention>VectorCall</CallingConvention>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<Import Project="$(SolutionDir)benchmark.props" />
<ItemGroup>
<ClCompile Include="..\test\args_product_test.cc" />
<ClCompile Include="..\test\basic_test.cc" />
<ClCompile Include="..\test\benchmark_test.cc" />
<ClCompile Include="..\test\fixture_test.cc" />
<ClCompile Include="..\test\internal_threading_test.cc" />
<ClCompile Include="..\test\link_main_test.cc" />
<ClCompile Include="..\test\main.cpp" />
<ClCompile Include="..\test\map_test.cc" />
<ClCompile Include="..\test\multiple_ranges_test.cc" />
<ClCompile Include="..\test\options_test.cc" />
@@ -107,7 +28,4 @@
<Project>{ef4de73e-ee11-4128-93eb-60b07e650ef2}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
14 changes: 13 additions & 1 deletion msvc/google-benchmark-test.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -15,15 +15,24 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\test\benchmark_test.cc">
<ClCompile Include="..\test\args_product_test.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test\basic_test.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test\benchmark_test.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test\fixture_test.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test\internal_threading_test.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test\link_main_test.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test\map_test.cc">
<Filter>Source Files</Filter>
</ClCompile>
@@ -36,5 +45,8 @@
<ClCompile Include="..\test\templated_fixture_test.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test\main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
Loading