Add premake scripts for c# projects

This commit is contained in:
Jan
2019-10-22 11:32:19 +02:00
parent 0d103e24a5
commit d213bab3f2
21 changed files with 74 additions and 354 deletions

View File

@ -13,26 +13,29 @@ function ZoneCodeGeneratorTests:project()
project "ZoneCodeGeneratorTests"
targetdir(TargetDirectoryTest)
location "%{wks.location}/test"
location "%{wks.location}/test/%{prj.name}"
kind "SharedLib"
language "C#"
files {
path.join(folder, "Zone/src/**.h"),
path.join(folder, "libtomcrypt/src/**.c")
path.join(folder, "ZoneCodeGeneratorTests/**.cs")
}
defines {
"_CRT_SECURE_NO_WARNINGS",
"_CRT_NONSTDC_NO_DEPRECATE",
"LTC_SOURCE",
"LTC_NO_TEST",
"LTC_NO_PROTOTYPES"
}
self:include()
libtommath:include()
-- Disable warnings. They do not have any value to us since it is not our code.
warnings "off"
vpaths { ["*"] = "test/ZoneCodeGeneratorTests" }
nuget {
"Moq:4.13.1",
"MSTest.TestFramework:2.0.0",
"MSTest.TestAdapter:2.0.0"
}
links {
"System",
"System.Core",
"System.Data",
"Moq",
"MSTest.TestFramework"
}
ZoneCodeGenerator:link()
end

View File

@ -1,110 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C29242DB-84D0-4A37-AD3F-19B72B23C7E0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ZoneCodeGeneratorTests</RootNamespace>
<AssemblyName>ZoneCodeGeneratorTests</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\MSTest.TestFramework.2.0.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\MSTest.TestFramework.2.0.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="Moq, Version=4.13.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\..\packages\Moq.4.13.0\lib\net45\Moq.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssertionExtensions.cs" />
<Compile Include="Domain\NamespaceTest.cs" />
<Compile Include="FieldInjector.cs" />
<Compile Include="Parsing\Impl\LexerTest.cs" />
<Compile Include="Parsing\Impl\PreprocessorTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherArrayTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherGroupAndTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherGroupLoopTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherGroupOptionalTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherGroupOrTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherLiteralTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherNameTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherNumberTest.cs" />
<Compile Include="Parsing\Matching\Matchers\MatcherTypenameTest.cs" />
<Compile Include="Parsing\Matching\Matchers\TestMatcher.cs" />
<Compile Include="Parsing\Mock\IncludingParsingStreamTest.cs" />
<Compile Include="Parsing\Testing\Tests\TestCloseBlockTest.cs" />
<Compile Include="Parsing\Testing\Tests\TestEnumMemberTest.cs" />
<Compile Include="Parsing\Testing\Tests\TestEnumTest.cs" />
<Compile Include="Parsing\Testing\Tests\TestForwardDeclTest.cs" />
<Compile Include="Parsing\Testing\Tests\TestNamespaceTest.cs" />
<Compile Include="Persistence\InMemoryDataRepositoryTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ZoneCodeGenerator\ZoneCodeGenerator.csproj">
<Project>{d1c20c32-9cb8-44b8-9df7-f0cf8fb304d3}</Project>
<Name>ZoneCodeGenerator</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\..\packages\MSTest.TestAdapter.2.0.0\build\net45\MSTest.TestAdapter.targets')" />
</Project>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="4.4.0" targetFramework="net461" />
<package id="Moq" version="4.13.0" targetFramework="net461" />
<package id="MSTest.TestAdapter" version="2.0.0" targetFramework="net461" />
<package id="MSTest.TestFramework" version="2.0.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net461" />
</packages>

View File

@ -13,7 +13,7 @@ function ZoneCommonTests:project()
project "ZoneCommonTests"
targetdir(TargetDirectoryTest)
location "%{wks.location}/test"
location "%{wks.location}/test/%{prj.name}"
kind "SharedLib"
language "C++"
@ -26,7 +26,4 @@ function ZoneCommonTests:project()
ZoneCommon:include()
ZoneCommon:link()
-- Disable warnings. They do not have any value to us since it is not our code.
warnings "off"
end