Add -lm to C and CPP compilation commands
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 11 Feb 2015 13:24:44 +0000 (15:24 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 11 Feb 2015 13:24:44 +0000 (15:24 +0200)
gruntmaster-compile

index be900b9..5af89b9 100755 (executable)
@@ -9,8 +9,8 @@ my ($format, $name) = @ARGV;
 my $basename = fileparse $name, qr/\..*/;
 
 given ($format){
-       exec 'gcc', qw/-DONLINE_JUDGE -std=gnu11 -Wall -Wextra -O2 -o/, $basename, $name when 'C';
-       exec 'g++', qw/-DONLINE_JUDGE -std=gnu++11 -Wall -Wextra -O2 -o/, $basename, $name when 'CPP';
+       exec 'gcc', qw/-DONLINE_JUDGE -std=gnu11 -Wall -Wextra -lm -O2 -o/, $basename, $name when 'C';
+       exec 'g++', qw/-DONLINE_JUDGE -std=gnu++11 -Wall -Wextra -lm -O2 -o/, $basename, $name when 'CPP';
        when ('MONO') {
                system 'gmcs', '-d:ONLINE_JUDGE', $name and die "gmcs failed: errno=$! return=$?";
                rename "$basename.exe", $basename;
This page took 0.023812 seconds and 4 git commands to generate.