diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-07-31 16:45:02 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-07-31 16:45:02 -0700 |
commit | 6eeaf689c0ae81bf9df46f975b014b2b9e465f0a (patch) | |
tree | b4b9c5a452743e0df56c8e3174267d756f6d94d1 | |
parent | 65334f8f33c92a1e37376d6484d60ee45b55ca1d (diff) |
Add a Linux z3 binary to the repo, and use that or z3.exe based on the OS
-rw-r--r-- | Binaries/z3 | bin | 0 -> 16438468 bytes | |||
-rw-r--r-- | Source/Dafny/DafnyOptions.cs | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Binaries/z3 b/Binaries/z3 Binary files differnew file mode 100644 index 00000000..7c60feb4 --- /dev/null +++ b/Binaries/z3 diff --git a/Source/Dafny/DafnyOptions.cs b/Source/Dafny/DafnyOptions.cs index 8972c490..66cf639f 100644 --- a/Source/Dafny/DafnyOptions.cs +++ b/Source/Dafny/DafnyOptions.cs @@ -11,6 +11,7 @@ namespace Microsoft.Dafny {
public DafnyOptions()
: base("Dafny", "Dafny program verifier") {
+ SetZ3ExecutableName();
}
public override string VersionNumber {
@@ -255,6 +256,15 @@ namespace Microsoft.Dafny // TODO: provide attribute help here
}
+ private void SetZ3ExecutableName() {
+ var platform = (int)System.Environment.OSVersion.Platform;
+ var isLinux = platform == 4 || platform == 128; // http://www.mono-project.com/docs/faq/technical/
+
+ //TODO should we also vendor an OSX build?
+ var binDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
+ Z3ExecutablePath = System.IO.Path.Combine(binDir, isLinux ? "z3" : "z3.exe");
+ }
+
public override void Usage() {
Console.WriteLine(@" ---- Dafny options ---------------------------------------------------------
|