File: fcs-win32-create-package.pl

package info (click to toggle)
freecell-solver 3.26.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,864 kB
  • ctags: 3,658
  • sloc: ansic: 34,721; perl: 12,320; xml: 5,999; python: 1,149; sh: 965; ruby: 347; cpp: 304; makefile: 151
file content (27 lines) | stat: -rwxr-xr-x 513 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl

use strict;
use warnings;

unlink("CMakeCache.txt");

my $c_fn = "CMakeLists.txt";
open my $in, "<", $c_fn;
open my $out, ">", "$c_fn.new";
while (my $l = <$in>)
{
    if ($l =~ m/\ASET *\( *COMPILER_FLAGS_TO_CHECK/ms)
    {
        $l =~ s{ *"-Werror[^"]*"}{}g;
    }
    print {$out} $l;
}
close($in);
close($out);
rename("$c_fn.new", $c_fn);

system("c:\\Program Files\\CMake 2.6\\bin\\cmake.exe",
    "-G", "MinGW Makefiles"
);

system("c:\\strawberry\\c\\bin\\mingw32-make.exe", "package");