diff --git a/aksetup_helper.py b/aksetup_helper.py index 228abb9546f3962e253c9ccfee4993d18615723b..39670029f4fe99f415203aa15fc1c8acd29b2462 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -170,7 +170,7 @@ def get_config(schema=None, warn_about_no_config=True): -def hack_distutils(debug=False, fast_link=True): +def hack_distutils(debug=False, fast_link=True, what_opt=3): # hack distutils.sysconfig to eliminate debug flags # stolen from mpi4py @@ -194,8 +194,12 @@ def hack_distutils(debug=False, fast_link=True): if debug: cflags.append("-g") else: - cflags.append("-O3") - cflags.append("-DNDEBUG") + if what_opt is None: + pass + else: + cflags.append("-O%s" % what_opt) + cflags.append("-DNDEBUG") + cvars['OPT'] = str.join(' ', cflags) cvars["CFLAGS"] = cvars["BASECFLAGS"] + " " + cvars["OPT"] @@ -515,7 +519,7 @@ class Libraries(StringListOption): class BoostLibraries(Libraries): def __init__(self, lib_base_name): Libraries.__init__(self, "BOOST_%s" % lib_base_name.upper(), - ["boost_%s-${BOOST_COMPILER}-mt" % lib_base_name], + ["boost_%s" % lib_base_name], help="Library names for Boost C++ %s library (without lib or .so)" % humanize(lib_base_name))