Skip to content

Commit

Permalink
Revert "api: dotnet: switch to multi-targeting project and modern cma…
Browse files Browse the repository at this point in the history
…ke-dotnet integration."
  • Loading branch information
NikolajBjorner committed Jan 16, 2019
1 parent 16c15d5 commit 038971c
Show file tree
Hide file tree
Showing 20 changed files with 645 additions and 740 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,3 @@ src/api/ml/z3.mllib
*.bak
doc/api
doc/code
.vs
examples/**/obj
CMakeSettings.json
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
# 64-bit UBSan Debug build
- LINUX_BASE=ubuntu_16.04 C_COMPILER=/usr/bin/clang-3.9 CXX_COMPILER=/usr/bin/clang++-3.9 TARGET_ARCH=x86_64 Z3_BUILD_TYPE=Debug UBSAN_BUILD=1 RUN_UNIT_TESTS=SKIP
# 64-bit ASan Debug build
- LINUX_BASE=ubuntu_16.04 C_COMPILER=/usr/bin/clang-3.9 CXX_COMPILER=/usr/bin/clang++-3.9 TARGET_ARCH=x86_64 Z3_BUILD_TYPE=Debug ASAN_BUILD=1 RUN_UNIT_TESTS=SKIP ASAN_DSO=/usr/lib/clang/3.9/lib/linux/libclang_rt.asan-x86_64.so
- LINUX_BASE=ubuntu_16.04 C_COMPILER=/usr/bin/clang-3.9 CXX_COMPILER=/usr/bin/clang++-3.9 TARGET_ARCH=x86_64 Z3_BUILD_TYPE=Debug ASAN_BUILD=1 RUN_UNIT_TESTS=SKIP ASAN_DSO=/usr/lib/clang/3.9/lib/linux/libclang_rt.asan-x86_64.so
# Build for running unit tests under ASan/UBSan
# FIXME: We should really be doing a debug build but the unit tests run too
# slowly when we do that.
Expand Down Expand Up @@ -85,7 +85,6 @@ matrix:
osx_image: xcode8.3
# Note: Apple Clang does not support OpenMP
env: Z3_BUILD_TYPE=RelWithDebInfo USE_OPENMP=0 DOTNET_BINDINGS=0

script:
# Use `travis_wait` when doing LTO builds because this configuration will
# have long link times during which it will not show any output which
Expand Down
8 changes: 0 additions & 8 deletions cmake/modules/DotnetImports.props.in

This file was deleted.

471 changes: 0 additions & 471 deletions cmake/modules/FindDotnet.cmake

This file was deleted.

5 changes: 2 additions & 3 deletions contrib/ci/Dockerfiles/z3_base_ubuntu32_16.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ RUN apt-get update && \
libomp-dev \
llvm-3.9 \
make \
mono-devel \
ninja-build \
python3 \
python3-setuptools \
Expand All @@ -47,6 +48,4 @@ RUN useradd -m user && \
echo 'user ALL=(root) NOPASSWD: ALL' >> /etc/sudoers
USER user
WORKDIR /home/user
# TODO .NET core does not support Linux x86 yet, disable it for now.
# see: https://github.com/dotnet/coreclr/issues/9265
ENV ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-3.9/bin/llvm-symbolizer DOTNET_BINDINGS=0
ENV ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-3.9/bin/llvm-symbolizer
12 changes: 2 additions & 10 deletions contrib/ci/Dockerfiles/z3_base_ubuntu_14.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ FROM ubuntu:14.04

RUN apt-get update && \
apt-get -y --no-install-recommends install \
apt-transport-https \
binutils \
clang-3.9 \
curl \
cmake \
doxygen \
default-jdk \
gcc-multilib \
Expand All @@ -19,20 +18,13 @@ RUN apt-get update && \
lib32gomp1 \
llvm-3.9 \
make \
mono-devel \
ninja-build \
python3 \
python3-setuptools \
python2.7 \
python-setuptools

RUN curl -SL https://packages.microsoft.com/config/ubuntu/14.04/packages-microsoft-prod.deb --output packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update && \
apt-get -y --no-install-recommends install dotnet-sdk-2.1

RUN curl -SL https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh --output cmake-3.12.0-Linux-x86_64.sh && \
sh cmake-3.12.0-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir

# Create `user` user for container with password `user`. and give it
# password-less sudo access
RUN useradd -m user && \
Expand Down
8 changes: 1 addition & 7 deletions contrib/ci/Dockerfiles/z3_base_ubuntu_16.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ FROM ubuntu:16.04

RUN apt-get update && \
apt-get -y --no-install-recommends install \
apt-transport-https \
binutils \
clang \
clang-3.9 \
cmake \
curl \
doxygen \
default-jdk \
gcc-multilib \
Expand All @@ -22,18 +20,14 @@ RUN apt-get update && \
libomp-dev \
llvm-3.9 \
make \
mono-devel \
ninja-build \
python3 \
python3-setuptools \
python2.7 \
python-setuptools \
sudo

RUN curl -SL https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb --output packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update && \
apt-get -y --no-install-recommends install dotnet-sdk-2.1

# Create `user` user for container with password `user`. and give it
# password-less sudo access
RUN useradd -m user && \
Expand Down
11 changes: 4 additions & 7 deletions contrib/ci/scripts/test_z3_examples_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,11 @@ if [ "X${PYTHON_BINDINGS}" = "X1" ]; then
fi

if [ "X${DOTNET_BINDINGS}" = "X1" ]; then
# Build .NET example
# FIXME: Move compliation step into CMake target
mcs ${Z3_SRC_DIR}/examples/dotnet/Program.cs /target:exe /out:dotnet_test.exe /reference:Microsoft.Z3.dll /r:System.Numerics.dll
# Run .NET example
if [ "X${ASAN_BUILD}" = "X1" ]; then
# The dotnet test get stuck on ASAN
# so don't run it for now.
echo "Skipping .NET example under ASan build"
else
run_quiet run_non_native_binding dotnet ${Z3_BUILD_DIR}/dotnet/netcoreapp2.0/dotnet.dll
fi
run_quiet run_non_native_binding mono ./dotnet_test.exe
fi

if [ "X${JAVA_BINDINGS}" = "X1" ]; then
Expand Down
7 changes: 0 additions & 7 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,3 @@ set_target_properties(z3_tptp5 PROPERTIES EXCLUDE_FROM_ALL TRUE)
if (BUILD_PYTHON_BINDINGS)
add_subdirectory(python)
endif()

################################################################################
# Build dotnet examples
################################################################################
if (BUILD_DOTNET_BINDINGS)
add_subdirectory(dotnet)
endif()
34 changes: 0 additions & 34 deletions examples/dotnet/CMakeLists.txt

This file was deleted.

3 changes: 2 additions & 1 deletion examples/dotnet/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Small example using the .Net bindings.
This example is only built if you have Visual Studio.
To build the example execute
make examples
in the build directory.

It will create a .net core 2.0 app.
It will create the executable dotnet_example.exe
12 changes: 0 additions & 12 deletions examples/dotnet/dotnet.csproj

This file was deleted.

Loading

0 comments on commit 038971c

Please sign in to comment.