Commit c4d132b6 authored by Ondrej Vysocky's avatar Ondrej Vysocky
Browse files

new meric wscript

parent 81f1ea2d
......@@ -6,8 +6,13 @@ def configure(ctx):
if ctx.options.flags:
ctx.env.append_unique("CXXFLAGS", ctx.options.flags.split( ))
ctx.env.append_unique("CXXFLAGS", [ "-std=c++14", "-fPIC"])
# ctx.env.append_unique("DEFINES", [ "HAVE_OMP_H" ])
ctx.env.append_unique("CXXFLAGS", [ "-std=c++14", "-fPIC"]) #no openMP
# if ctx.options.withgcc:
# ctx.env.append_unique("CXXFLAGS", [ "-fopenmp" ]) #GCC
# ctx.env.append_unique("DEFINES", [ "HAVE_OMP_H" ]) #with openMP
# else:
# ctx.env.append_unique("CXXFLAGS", [ "-qopenmp" ]) #Intel
# ctx.env.append_unique("DEFINES", [ "HAVE_OMP_H" ]) #with openMP
if ctx.options.debug:
ctx.env.append_unique("DEFINES", [ "__MERIC_DEBUG__" ])
......@@ -15,7 +20,9 @@ def configure(ctx):
ctx.env.append_unique("DEFINES", [ "VERBOSE" ])
if ctx.options.dummy:
ctx.env.append_unique("DEFINES", [ "USE_DUMMY" ])
ctx.env.append_unique("CXXFLAGS", [ "-I"+ctx.path.abspath()+"/include/"])
else:
# ctx.env.append_unique("DEFINES", [ "HAVE_HDEEM_H" ]) # if problem with searching
ctx.check_cc(header_name="hdeem.h", execute=False, mandatory=True)
ctx.check_cc(header_name="linux/perf_event.h", execute=False, mandatory=False)
ctx.check_cc(header_name="cpufreq.h", execute=False, mandatory=False)
......@@ -23,6 +30,10 @@ def configure(ctx):
ctx.check_cc(header_name="papi.h", execute=False, mandatory=False)
# ctx.check_cc(header_name="cilk/cilk_api.h", execute=False, mandatory=False)
# ctx.env.append_unique("DEFINES", [ "HAVE_LINUX_PERF_EVENT_H" ]) #if problem with searching
# ctx.env.append_unique("DEFINES", [ "HAVE_X86_ADAPT_H" ]) #if problem with searching
ctx.find_program(ctx.options.mpi, var="MPICXX", mandatory=False)
if ctx.env.MPICXX:
ctx.setenv("mpi", ctx.env.derive())
......@@ -80,6 +91,13 @@ def build(ctx):
def options(opt):
opt.add_option(
"--withgcc",
action="store_true",
default=False,
help="use GCC instead of Intel compiler"
)
opt.add_option(
"--verbose",
action="store_true",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment