Browse Source

提交日期demo

master
panyufeng 3 years ago
commit
9732bf7c74
10 changed files with 637 additions and 0 deletions
  1. +2
    -0
      boost_test/Makefile
  2. +24
    -0
      boost_test/boost_test.cpp
  3. +31
    -0
      boost_test/boost_test.sln
  4. +164
    -0
      boost_test/boost_test.vcxproj
  5. +22
    -0
      boost_test/boost_test.vcxproj.filters
  6. +2
    -0
      boost_timer/Makefile
  7. +174
    -0
      boost_timer/boost_timer.cpp
  8. +31
    -0
      boost_timer/boost_timer.sln
  9. +165
    -0
      boost_timer/boost_timer.vcxproj
  10. +22
    -0
      boost_timer/boost_timer.vcxproj.filters

+ 2
- 0
boost_test/Makefile View File

@ -0,0 +1,2 @@
boost_test:boost_test.cpp
g++ $^ -o $@

+ 24
- 0
boost_test/boost_test.cpp View File

@ -0,0 +1,24 @@
#include <boost/lexical_cast.hpp>
#include <iostream>
using namespace std;
int main()
{
using boost::lexical_cast;
int a = lexical_cast<int>("123");
double b = lexical_cast<double>("123.0123456789");
string s0 = lexical_cast<string>(a);
string s1 = lexical_cast<string>(b);
cout << "number: " << a << " " << b << endl;
cout << "string: " << s0 << " " << s1 << endl;
int c = 0;
try {
c = lexical_cast<int>("abcd");
}
catch (boost::bad_lexical_cast& e) {
cout << e.what() << endl;
}
return 0;
}

+ 31
- 0
boost_test/boost_test.sln View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1525
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_test", "boost_test.vcxproj", "{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Debug|x64.ActiveCfg = Debug|x64
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Debug|x64.Build.0 = Debug|x64
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Debug|x86.ActiveCfg = Debug|Win32
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Debug|x86.Build.0 = Debug|Win32
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Release|x64.ActiveCfg = Release|x64
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Release|x64.Build.0 = Release|x64
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Release|x86.ActiveCfg = Release|Win32
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5F7FB1D9-E114-4EC1-B5F5-4C115CC3FE7C}
EndGlobalSection
EndGlobal

+ 164
- 0
boost_test/boost_test.vcxproj View File

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<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>15.0</VCProjectVersion>
<ProjectGuid>{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>boosttest</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<ReferencePath>D:\c++\lib\boost\include\boost-1_76;$(ReferencePath)</ReferencePath>
<LibraryPath>D:\c++\lib\boost\lib;$(LibraryPath)</LibraryPath>
<IncludePath>D:\c++\lib\boost\include\boost-1_76;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>D:\c++\lib\boost\include\boost-1_76;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>D:\c++\lib\boost\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="boost_test.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

+ 22
- 0
boost_test/boost_test.vcxproj.filters View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="boost_test.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

+ 2
- 0
boost_timer/Makefile View File

@ -0,0 +1,2 @@
boost_timer:boost_timer.cpp
g++ $^ -o $@

+ 174
- 0
boost_timer/boost_timer.cpp View File

@ -0,0 +1,174 @@

//#define DATE_TIME_NO_DEFAULT_CONSTRUCTOR //不希望出现无效时间
#include <boost/timer.hpp>
#include <boost/progress.hpp>
#include <iostream>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
using namespace std;
using namespace boost;
using namespace boost::gregorian;
using namespace boost::posix_time;
//自定义字面值 c11 新增了重载operator""的特性
days operator"" _D(unsigned long long n)
{
return days(n);
}
weeks operator"" _W(unsigned long long n) {
return weeks(n);
}
date operator"" _YMD(const char* s, std::size_t) {
return from_string(s);
}
int main()
{
timer t; //计时器
cout << "max timespan:" << t.elapsed_max() / 3600 << "h" << endl; // 可度量的最大时间
cout << "min timespan:" << t.elapsed_min() << "s" << endl; //最小时间
cout << "now time elapsed:" << t.elapsed() << "s" << endl; //流逝的时间
progress_timer t2; //析构时会打印流逝时间elapsed()
// progress_timer t3 = t2; //继承自noncopyable 不行
// progress_timer t3(t2); //继承自noncopyable 不行
/******************************DATE*******************************/
gregorian::date d(2021,7,11);
d = day_clock::local_day(); //当前时间
gregorian::date d2 = from_string("2021-7-11");
//d = from_undelimited_string("20210711");
cout << to_iso_extended_string(d) << endl; // 日期以指定格式打印
cout << to_iso_string(d) << endl;
cout << to_simple_string(d) << endl;
if (d > d2) { //支持比较操作符
cout << "1111" << endl;
}
int inweek = d.day_of_week();
cout << inweek << endl; //星期几
int numInYear = d.day_of_year();
cout << numInYear << endl; //一年中的第几天
// 与C结构 tm 相互转换
tm _tm = to_tm(d);
date_from_tm(_tm);
/******************************DATE END*******************************/
//日期计算
days day(1); //1天
weeks week(1); //1个星期
months mon(1); //1个月
years year(1); //1年
d += day ;
d += week;
d += mon;
d += year;
cout << to_iso_extended_string(d) << endl;
//
date ddd(2021, 3, 30);
ddd -= months(1); //20210228 //注意 这里得到的是月末
//日期区间 左闭右开区间
date_period dp(d, days(20));
if (dp.contains(d + days(2))) //是否包含 is_before is_after 在前在后、
cout << 111 << endl;
//还有交集、并集等 不常用就不一一讲了
//日期迭代器 好像没啥用。。。
//day_iterator iter(d);
/******************************TIME*******************************/
posix_time::time_duration time(1,10,30,1000);//时、分、秒、微秒
cout << time << endl;
hours houre(1);
minutes min(10);
seconds sec(59);
millisec ms(1000);
time_duration time2 = houre + min + sec + ms;
cout << to_simple_string(time2) << endl; //以指定格式打印
//与 date类似也可以用于比较
//转换到tm
_tm = to_tm(time2); //但是不能反向转换
//默认精确度到微秒,纳秒相关的类函数默认都不可用!! 纳秒用得也不多,就不讨论了。。
/******************************TIME END*******************************/
/******************************DATE_TIME*******************************/
ptime _ptime(d, time); //同时包含 日期和时间的结构
ptime p1 = time_from_string("2021-7-12 01:00:00");
ptime p2 = from_iso_string("20210712T020000");
ptime p3 = second_clock::local_time(); //精确到秒
ptime p4 = second_clock::universal_time(); //精确到微秒
//操作ptime 可以分解为 date time 来处理
//也支持加减处理
p3 += hours(3);
cout << to_simple_string(p3) << endl;
cout << to_iso_string(p3) << endl;
cout << to_iso_extended_string(p3) << endl; //源码是以T为分隔,可以自己改为空格
//转为c结构:
_tm = to_tm(p3);
ptime_from_tm(_tm);
ptime p5 = from_time_t(std::time(0));
std::time_t time_t = to_time_t(p5);
//时间区间 time_period //类似于 date_period 不在细说了
/******************************DATE_TIME_END*******************************/
days d11 = 11_D; //这个用来装逼还挺有一套,基础撇点的都不知道,哈哈
weeks w3 = 3_W;
date d20110712 = "2021-7-12"_YMD;
//格式化时间
//这个玩意儿 继承自std::locale::facet 是个智能指针,当引用计数为0 就会自动delete掉 。 所以当创在栈上,或创在堆上手动delete都会飞掉!注意了!
date_facet *facet = new date_facet("%Y年%m月%d日");
cout.imbue(locale(cout.getloc(),facet));
cout << d20110712 << endl;
time_facet* tfacet = new time_facet("%Y年%m月%d日 %H点%M分%S%F秒");
cout.imbue(locale(cout.getloc(), tfacet));
cout << p4 << endl;
return 0;
}

+ 31
- 0
boost_timer/boost_timer.sln View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1525
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_timer", "boost_timer.vcxproj", "{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Debug|x64.ActiveCfg = Debug|x64
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Debug|x64.Build.0 = Debug|x64
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Debug|x86.ActiveCfg = Debug|Win32
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Debug|x86.Build.0 = Debug|Win32
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Release|x64.ActiveCfg = Release|x64
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Release|x64.Build.0 = Release|x64
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Release|x86.ActiveCfg = Release|Win32
{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5F7FB1D9-E114-4EC1-B5F5-4C115CC3FE7C}
EndGlobalSection
EndGlobal

+ 165
- 0
boost_timer/boost_timer.vcxproj View File

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<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>15.0</VCProjectVersion>
<ProjectGuid>{BE9452A1-E1E4-4E46-8CB5-3005DEE778ED}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>boosttest</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<ProjectName>boost_timer</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<ReferencePath>D:\c++\lib\boost\include\boost-1_76;$(ReferencePath)</ReferencePath>
<LibraryPath>D:\c++\lib\boost\lib;$(LibraryPath)</LibraryPath>
<IncludePath>D:\c++\lib\boost\include\boost-1_76;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>D:\c++\lib\boost\include\boost-1_76;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>D:\c++\lib\boost\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="boost_timer.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

+ 22
- 0
boost_timer/boost_timer.vcxproj.filters View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="boost_timer.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

Loading…
Cancel
Save