Add D
authorSergiu <srg.pscs@gmail.com>
Fri, 22 Jan 2016 21:01:44 +0000 (23:01 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 23 Jan 2016 16:12:33 +0000 (16:12 +0000)
gruntmaster-compile
lib/Gruntmaster/Daemon.pm
t/01-jobs.t
t/problems/hello/tests/d/meta.yml [new file with mode: 0644]
t/problems/hello/tests/d/prog.d [new file with mode: 0644]

index 3a0dac886e9248e41f8f96b9e651d390ec586db8..be5dab5c3bccd03a3076c4061ee41c0dc078b0f7 100755 (executable)
@@ -31,6 +31,7 @@ given ($format){
        exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL';
        exec 'rustc', qw/-O -o/, $basename, $name when 'RUST';
        exec 'ocamlc', qw/-o/, $basename, $name when 'OCAML';
+       exec 'dmd', qw/-version=ONLINE_JUDGE -O -release -inline -noboundscheck/, $name when 'D';
 
        when ('BRAINFUCK') {
                system 'bfc', $name and die "bfc failed: errno=$! return=$?";
index f37eaf6eec4b84658ef333feec2695204386318a..7189c84185b9a4b343e1c4c78ea4ebd1366c0a3c 100644 (file)
@@ -21,6 +21,7 @@ use constant FORMAT_EXTENSION => {
        BRAINFUCK => 'bf',
        C => 'c',
        CPP => 'cpp',
+       D => 'd',
        GCCGO => 'go',
        GOLANG => 'go',
        GOLFSCRIPT => 'gs',
index 6fb5a160233393140f348c8a9f686576c36210c3..2cb1eb19ed57b6da83d5e5dcea85aa38e306a83d 100644 (file)
@@ -22,6 +22,7 @@ use constant COMPILER => {
        qw/BRAINFUCK bfc
           C gcc
           CPP g++
+          D dmd
           GOLFSCRIPT golfscript
           MONO gmcs
           JAVA javac
diff --git a/t/problems/hello/tests/d/meta.yml b/t/problems/hello/tests/d/meta.yml
new file mode 100644 (file)
index 0000000..806a1fd
--- /dev/null
@@ -0,0 +1,7 @@
+test_name: D
+test_description: Hello world in D
+problem: hello
+files:
+  prog:
+    format: D
+    name: prog.d
diff --git a/t/problems/hello/tests/d/prog.d b/t/problems/hello/tests/d/prog.d
new file mode 100644 (file)
index 0000000..4d988a9
--- /dev/null
@@ -0,0 +1,4 @@
+import std.stdio : writeln;
+void main() {
+    writeln("Hello World!");
+}
This page took 0.013136 seconds and 4 git commands to generate.