Skip to content

Commit cabe0ee

Browse files
integrating additional changes from @yatli pull request Z3Prover#1815
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 37d9e6d commit cabe0ee

9 files changed

+148
-458
lines changed

examples/CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,10 @@ set_target_properties(z3_tptp5 PROPERTIES EXCLUDE_FROM_ALL TRUE)
112112
if (BUILD_PYTHON_BINDINGS)
113113
add_subdirectory(python)
114114
endif()
115+
116+
################################################################################
117+
# Build dotnet examples
118+
################################################################################
119+
#if (BUILD_DOTNET_BINDINGS)
120+
# add_subdirectory(dotnet)
121+
#endif()

examples/dotnet/dotnet.csproj

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.Z3" Version="$(Z3_VERSION)" />
10+
</ItemGroup>
11+
12+
</Project>

src/api/dotnet/Microsoft.Z3.Sharp.pc.in

-7
This file was deleted.

src/api/dotnet/Microsoft.Z3.csproj

-418
This file was deleted.

src/api/dotnet/Microsoft.Z3.csproj.in

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<!-- Package metadata properties -->
4+
<PropertyGroup>
5+
6+
<PackageId>Microsoft.Z3</PackageId>
7+
<AssemblyName>Microsoft.Z3</AssemblyName>
8+
<RootNamespace>Microsoft.Z3</RootNamespace>
9+
10+
<Title>Z3 .NET Interface</Title>
11+
<AssemblyTitle>Z3 .NET Interface</AssemblyTitle>
12+
13+
<AssemblyProduct>Z3</AssemblyProduct>
14+
15+
<Description>Z3 is a satisfiability modulo theories solver from Microsoft Research.</Description>
16+
<AssemblyDescription>.NET Interface to the Z3 Theorem Prover</AssemblyDescription>
17+
18+
<Copyright>Copyright (C) 2006-2019 Microsoft Corporation</Copyright>
19+
<AssemblyCopyright>Copyright (C) 2006-2019 Microsoft Corporation</AssemblyCopyright>
20+
21+
<Company>Microsoft Corporation</Company>
22+
<AssemblyCompany>Microsoft Corporation</AssemblyCompany>
23+
24+
<Version>@VER_MAJOR@.@VER_MINOR@.@VER_BUILD@.@VER_REVISION@</Version>
25+
<AssemblyVersion>@VER_MAJOR@.@VER_MINOR@.@VER_BUILD@.@VER_REVISION@</AssemblyVersion>
26+
27+
<FileVersion>@VER_MAJOR@.@VER_MINOR@.@VER_BUILD@.@VER_REVISION@</FileVersion>
28+
<AssemblyFileVersion>@VER_MAJOR@.@VER_MINOR@.@VER_BUILD@.@VER_REVISION@</AssemblyFileVersion>
29+
30+
<PackageVersion>${DOTNET_PACKAGE_VERSION}</PackageVersion>
31+
<PackageTags>smt constraint solver theorem prover</PackageTags>
32+
33+
<Authors>Microsoft</Authors>
34+
<Company>Microsoft</Company>
35+
</PropertyGroup>
36+
37+
<!-- Code contract & signing properties -->
38+
<PropertyGroup Condition="'$(Configuration)' != 'Release_delaysign'">
39+
<SignAssembly>false</SignAssembly>
40+
<DelaySign>false</DelaySign>
41+
</PropertyGroup>
42+
43+
<PropertyGroup Condition="'$(Configuration)' == 'Release_delaysign'">
44+
<DefineConstants>DELAYSIGN</DefineConstants>
45+
<SignAssembly>true</SignAssembly>
46+
<DelaySign>true</DelaySign>
47+
</PropertyGroup>
48+
49+
<!-- Build properties -->
50+
<PropertyGroup>
51+
<!-- In *nix builds, netfx TFMs are not available. -->
52+
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
53+
<OutputTypeEx>library</OutputTypeEx>
54+
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
55+
<NoWarn>1701,1702</NoWarn>
56+
<Warn>4</Warn>
57+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
58+
<DocumentationFile>$(OutputPath)\Microsoft.Z3.xml</DocumentationFile>
59+
</PropertyGroup>
60+
61+
<!-- Compilation items -->
62+
<ItemGroup>
63+
${Z3_DOTNET_COMPILE_ITEMS}
64+
</ItemGroup>
65+
66+
<!-- Legacy .NET framework native library helper routines -->
67+
<ItemGroup>
68+
<Content Include="${CMAKE_CURRENT_LIST_DIR}/Microsoft.Z3.props">
69+
<PackagePath>build</PackagePath>
70+
</Content>
71+
<Content Include="${CMAKE_CURRENT_LIST_DIR}/Microsoft.Z3.targets">
72+
<PackagePath>build</PackagePath>
73+
</Content>
74+
</ItemGroup>
75+
76+
<!-- TODO we may want to pack x64 and x86 native assemblies into a single nupkg -->
77+
78+
<!-- Native binaries x64 -->
79+
<ItemGroup Condition="'$(Platform)' != 'x86'">
80+
<Content Include="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$(_DN_CMAKE_CONFIG)/libz3.dll" Condition="Exists('${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$(_DN_CMAKE_CONFIG)/libz3.dll')">
81+
<PackagePath>runtimes\win-x64\native</PackagePath>
82+
</Content>
83+
<Content Include="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libz3.so" Condition="Exists('${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libz3.so')">
84+
<PackagePath>runtimes\linux-x64\native</PackagePath>
85+
</Content>
86+
</ItemGroup>
87+
88+
<!-- Native binaries for x86; currently only Windows is supported. -->
89+
<ItemGroup Condition="'$(Platform)' == 'x86'">
90+
<Content Include="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$(_DN_CMAKE_CONFIG)/libz3.dll" Condition="Exists('${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/$(_DN_CMAKE_CONFIG)/libz3.dll')">
91+
<PackagePath>runtimes\win-x86\native</PackagePath>
92+
</Content>
93+
</ItemGroup>
94+
95+
</Project>

src/api/dotnet/Microsoft.Z3.props

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<!-- Paths -->
5+
<PropertyGroup>
6+
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
7+
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
8+
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
9+
10+
<!-- Probe the package root path -->
11+
<Z3_PACKAGE_PATH Condition="('$(Z3_PACKAGE_PATH)' == '')">$(MSBuildThisFileDirectory)..\</Z3_PACKAGE_PATH>
12+
<Z3_NATIVE_LIB_PATH Condition="'$(IsWindows)' == 'true' and '$(Platform)' != 'x86'">$(Z3_PACKAGE_PATH)runtimes\win-x64\native\libz3.dll</Z3_NATIVE_LIB_PATH>
13+
<Z3_NATIVE_LIB_PATH Condition="'$(IsWindows)' == 'true' and '$(Platform)' == 'x86'">$(Z3_PACKAGE_PATH)runtimes\win-x86\native\libz3.dll</Z3_NATIVE_LIB_PATH>
14+
<Z3_NATIVE_LIB_PATH Condition="'$(IsLinux)' == 'true'">$(Z3_PACKAGE_PATH)runtimes\linux-x64\native\libz3.so</Z3_NATIVE_LIB_PATH>
15+
</PropertyGroup>
16+
17+
<!-- Configurations -->
18+
<PropertyGroup>
19+
<!-- Disable "prefer 32-bit mode", so that the program runs in 64 bit mode and loads libz3 correctly. -->
20+
<Prefer32Bit>false</Prefer32Bit>
21+
</PropertyGroup>
22+
23+
</Project>

src/api/dotnet/Microsoft.Z3.targets

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<ItemGroup Condition="!$(TargetFramework.Contains('netstandard')) and !$(TargetFramework.Contains('netcoreapp'))">
5+
<None Include="$(Z3_NATIVE_LIB_PATH)">
6+
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
7+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
8+
</None>
9+
</ItemGroup>
10+
11+
</Project>

src/api/dotnet/core/README.txt

-15
This file was deleted.

src/api/dotnet/core/core.csproj

-18
This file was deleted.

0 commit comments

Comments
 (0)