diff options
author | Simon Rozman <simon@rozman.si> | 2019-04-12 13:02:34 +0200 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2019-04-12 15:35:38 +0200 |
commit | 50a09cad7150c9a64836544ce7e1f1de81edb2b3 (patch) | |
tree | 5bec3cb7f9078234531a4a92c4bb72cc487a62f5 /wintun.vcxproj | |
parent | Enable code analysis on Release build and set it to DriverMustFixRules (diff) | |
download | wintun-50a09cad7150c9a64836544ce7e1f1de81edb2b3.tar.xz wintun-50a09cad7150c9a64836544ce7e1f1de81edb2b3.zip |
Move #define NDIS... to ClCompile/PreprocessorDefinitions
These constants must be defined in the project file in order for Static
Driver Verifier to work correctly. Otherwise, SDV returns error MSB3073:
The command "staticdv /check:*" exited with code -1.
Since the ClCompile/PreprocessorDefinitions management became
cumbersome, all platform and configuration independent MSVC settings
were rearranged in a single <ItemDefinitionGroup>, while platform
independent but configuration dependent were rearranged to a conditional
<ItemDefinitionGroup>(s).
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to '')
-rw-r--r-- | wintun.vcxproj | 63 |
1 files changed, 11 insertions, 52 deletions
diff --git a/wintun.vcxproj b/wintun.vcxproj index 554fba2..3af0b06 100644 --- a/wintun.vcxproj +++ b/wintun.vcxproj @@ -98,84 +98,43 @@ <RunCodeAnalysis>true</RunCodeAnalysis> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup> <ClCompile> - <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";NDIS_MINIPORT_DRIVER=1;NDIS630_MINIPORT=1;NDIS_WDM=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>Level4</WarningLevel> <EnablePREfast>true</EnablePREfast> </ClCompile> <ResourceCompile> - <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";NDIS_MINIPORT_DRIVER=1;NDIS630_MINIPORT=1;NDIS_WDM=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> <Link> <AdditionalDependencies>ndis.lib;wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> - <Inf> - <TimeStamp>$(WintunVersionMaj).$(WintunVersionMin).$(WintunVersionRev).$(WintunVersionBuild)</TimeStamp> - </Inf> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";DBG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <WarningLevel>Level4</WarningLevel> - <EnablePREfast>true</EnablePREfast> - <Optimization>Disabled</Optimization> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";DBG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - <Link> - <AdditionalDependencies>ndis.lib;wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> - <Inf> - <TimeStamp>*</TimeStamp> - </Inf> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";%(PreprocessorDefinitions)</PreprocessorDefinitions> - <WarningLevel>Level4</WarningLevel> - <EnablePREfast>true</EnablePREfast> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ResourceCompile> - <Link> - <AdditionalDependencies>ndis.lib;wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> + <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'"> <Inf> <TimeStamp>$(WintunVersionMaj).$(WintunVersionMin).$(WintunVersionRev).$(WintunVersionBuild)</TimeStamp> </Inf> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'"> <ClCompile> - <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";DBG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <WarningLevel>Level4</WarningLevel> - <EnablePREfast>true</EnablePREfast> + <PreprocessorDefinitions>DBG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Optimization>Disabled</Optimization> </ClCompile> <ResourceCompile> - <PreprocessorDefinitions>WINTUN_VERSION_MAJ=$(WintunVersionMaj);WINTUN_VERSION_MIN=$(WintunVersionMin);WINTUN_VERSION_REV=$(WintunVersionRev);WINTUN_VERSION_BUILD=$(WintunVersionBuild);WINTUN_VERSION_STR="$(WintunVersionStr)";DBG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>DBG;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ResourceCompile> - <Link> - <AdditionalDependencies>ndis.lib;wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> <Inf> <TimeStamp>*</TimeStamp> </Inf> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <ItemGroup> <ClCompile Include="wintun.c" /> </ItemGroup> |