summaryrefslogtreecommitdiff
path: root/Source/GPUVerify
diff options
context:
space:
mode:
authorGravatar Peter Collingbourne <peter@pcc.me.uk>2012-06-08 18:10:39 +0100
committerGravatar Peter Collingbourne <peter@pcc.me.uk>2012-06-08 18:10:39 +0100
commit41c3e29e101a76982e82756b2f3bc679e60d13ac (patch)
tree2fd3591d62355d39c90abb4f1c77f5af56f05962 /Source/GPUVerify
parent8d73f5d80db040814c74495ac9f324a28b6b9930 (diff)
GPUVerify: if one input file is supplied, choose output file name more intelligently
Specifically, if the input file's extension is not ".bpl", use its name (without extension) plus ".bpl" as the output file name.
Diffstat (limited to 'Source/GPUVerify')
-rw-r--r--Source/GPUVerify/Main.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/GPUVerify/Main.cs b/Source/GPUVerify/Main.cs
index c8d29282..d1fcca9e 100644
--- a/Source/GPUVerify/Main.cs
+++ b/Source/GPUVerify/Main.cs
@@ -129,6 +129,12 @@ namespace GPUVerify
{
fn = CommandLineOptions.outputFile;
}
+ else if (CommandLineOptions.inputFiles.Count == 1)
+ {
+ var inputFile = CommandLineOptions.inputFiles[0];
+ if (Path.GetExtension(inputFile).ToLower() != ".bpl")
+ fn = Path.GetFileNameWithoutExtension(inputFile);
+ }
ResolutionContext rc;
Program program = parse(out rc);
IList<GPUVerifier> result = new List<GPUVerifier>();