Exemplo n.º 1
0
    help="Add this optimization flag to the compiler(s). Default: -O['2']")
parser.add_argument("-f", '--fcflags', action='append',
    help="Add this flag to the compiler(s) (optimization see above). Default:" +
         " -FCFLAGS=['-fmax-errors=1 -O2 -fbounds-check']")
parser.add_argument("-f77", '--f77flags', action='append',
    help="Add this flag to the compiler(s) (optimization see above). Default:" +
         " -FCFLAGS=['']")
parser.add_argument("-p", '--openmp', action='store_true',
    help='Activate OpenMP')
parser.add_argument('--only_omega', action='store_true',
    help='Only build the OMega subpackage.')

args = parser.parse_args()

# Select a base path
base_path = bt.get_base_path()

if not args.compiler:
  args.compiler = 'gfortran'
if not args.fcflags:
  args.fcflags = ' '
if not args.f77flags:
  args.f77flags = ' '
if not args.configureflags:
  args.configureflags = []

if not args.optimization:
  args.optimization = '2'

# Plugins
if spawn.find_executable('fastjet-config'):
Exemplo n.º 2
0
# Parse command line options
parser = argparse.ArgumentParser(
    description="Check the Whizard", formatter_class=argparse.ArgumentDefaultsHelpFormatter
)

# optional tasks that will be performed
parser.add_argument("-c", "--clean", action="store_true", help="Perform clean rebuilds")

# options how to behave
parser.add_argument("-j", "--jobs", default=2, help="Set number of jobs for make and make check")

args = parser.parse_args()

# Select a base path
base_path = get_base_path()

nostatic_builds = ["extended", "gfortran-quadruple", "ifort-stdsemantics", "ifort", "nagfor-jenkins", "dist"]
builds = ["nagfor-dist-disabled"] + [b + "-nostatic" for b in nostatic_builds]

print "builds to consider:", builds


def run(cmd, log_filename):
    logfilen = log_filename.replace(" ", "_")
    with open(logfilen, "wb", 0) as logfile:
        return (cmd, subprocess.Popen(cmd, stdout=logfile))


if args.clean:
    flag = "-A"