|
10 | 10 | <ItemGroup Label="BuildOptionsExtension"> |
11 | 11 | <PropertyPageSchema Include="$(MSBuildThisFileDirectory)libbitcoin-system.import.xml" /> |
12 | 12 | </ItemGroup> |
| 13 | + |
| 14 | + <!-- Options --> |
| 15 | + |
| 16 | + <!-- These create non-portability. --> |
| 17 | + <!-- These will compile to the target regardless of the compiling platform. --> |
| 18 | + <!-- That will result in a crash of test/executable execution if mismatched. --> |
| 19 | + <PropertyGroup> |
| 20 | + <Option-avx512>false</Option-avx512> |
| 21 | + <Option-avx2>true</Option-avx2> |
| 22 | + <Option-sse41>true</Option-sse41> |
| 23 | + <Option-shani>false</Option-shani> |
| 24 | + <Option-neon>false</Option-neon> |
| 25 | + </PropertyGroup> |
| 26 | + <ItemDefinitionGroup> |
| 27 | + <ClCompile> |
| 28 | + <!-- order matters --> |
| 29 | + <EnableEnhancedInstructionSet Condition="'$(Option-avx2)' == 'true'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet> |
| 30 | + <EnableEnhancedInstructionSet Condition="'$(Option-avx512)' == 'true'">AdvancedVectorExtensions512</EnableEnhancedInstructionSet> |
| 31 | + </ClCompile> |
| 32 | + </ItemDefinitionGroup> |
| 33 | + |
| 34 | + <!-- Messages --> |
| 35 | + |
| 36 | + <Target Name="OptionInfo" BeforeTargets="PrepareForBuild"> |
| 37 | + <Message Text="Option-avx512 : $(Option-avx512)" Importance="high"/> |
| 38 | + <Message Text="Option-avx2 : $(Option-avx2)" Importance="high"/> |
| 39 | + <Message Text="Option-sse41 : $(Option-sse41)" Importance="high"/> |
| 40 | + <Message Text="Option-shani : $(Option-shani)" Importance="high"/> |
| 41 | + <Message Text="Option-neon : $(Option-neon)" Importance="high"/> |
| 42 | + </Target> |
13 | 43 |
|
14 | 44 | <!-- Linkage --> |
15 | 45 |
|
|
18 | 48 | <AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\..\libbitcoin-system\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
19 | 49 | <!-- WITH_ICU always defined in Visual Studio builds. --> |
20 | 50 | <!-- NOMINMAX enables use of std::min/max without conflict. --> |
21 | | - <!-- BOOST_EXCEPTION_DISABLE must be set here to be captured by all includes. --> |
22 | 51 | <!-- WIN32_LEAN_AND_MEAN avoids inclusion of certain headers, winsock.h conflicts with boost and protocol use of winsock2.h. --> |
23 | 52 | <PreprocessorDefinitions>WITH_ICU;WIN32_LEAN_AND_MEAN;NOMINMAX;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
24 | 53 | <PreprocessorDefinitions Condition="'$(Linkage-libbitcoin-system)' == 'static' Or '$(Linkage-libbitcoin-system)' == 'ltcg'">BC_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
25 | 54 | </ClCompile> |
| 55 | + <ClCompile> |
| 56 | + <!-- Enable use of CPU intrinsics. --> |
| 57 | + <PreprocessorDefinitions Condition="'$(Option-avx512)' == 'true'">WITH_AVX512;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 58 | + <PreprocessorDefinitions Condition="'$(Option-avx2)' == 'true'">WITH_AVX2;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 59 | + <PreprocessorDefinitions Condition="'$(Option-sse41)' == 'true'">WITH_SSE41;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 60 | + <PreprocessorDefinitions Condition="'$(Option-shani)' == 'true'">WITH_SHANI;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 61 | + <PreprocessorDefinitions Condition="'$(Option-neon)' == 'true'">WITH_NEON;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 62 | + </ClCompile> |
| 63 | + <Link> |
| 64 | + <!-- 4099: warns about missing PDB files. --> |
| 65 | + <AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions> |
| 66 | + </Link> |
26 | 67 | <Link> |
27 | 68 | <AdditionalDependencies Condition="'$(Linkage-libbitcoin-system)' != ''">libbitcoin-system.lib;%(AdditionalDependencies)</AdditionalDependencies> |
28 | 69 | </Link> |
|
0 commit comments