pass extra compile args from setup.py and set compiler env

No, to compile on the clusters using gcc we have to set the environment
variables by hand when using cmake. I discussed this with Catherine and we
couldn't find a better solution.
On 14 Oct 2014 16:23, "Jacob Stevenson" <notifications@github.com> wrote:

> In setup_with_cmake.py:
>
> > @@ -157,14 +160,26 @@ def add_module(self, filename):
> >      for fname in cxx_files:
> >          fout.write("make_cython_lib(${CMAKE_SOURCE_DIR}/%s)\n" % fname)
> >
> > -
> > -
> > -def run_cmake():
> > +def set_compiler_env(compiler_id):
> > +    env = os.environ.copy()
> > +    if compiler_id == "GNU":
> > +        env["CC"] = "gcc"
> > +        env["CXX"] = "g++"
> > +    elif compiler_id == "INTEL":
> > +        env["CC"] = "icc"
> > +        env["CXX"] = "icpc"
> > +    else:
> > +        raise Exception("compiler_id not known")
> > +    return env
>
> I suspect cmake is smart enough to use the correct CXX compiler if CC is
> set to gcc. Which would simplify this bit of code quite a lot. Can you
> check this?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pele-python/mcpele/pull/51/files#r18835864>.
>