I am building a plugin to Quantum Espresso called Yambo, as a part of the whole QE build. QE plugins build with the make command, which in turn runs configure/make of the plugin. So, being a newbie, I simply add :make('yambo') to the install function of the QE's package.py.
Now, Yambo requires to redefine some environment variables, which I also do in the packages.py:
env['F90']=spack_fc
env['FCFLAGS']='-assume bscc -g -O3 -ip'
Those variables seem to pass to the Yambo's configure fine.
The tricky thing is CPP, which I set as:
env['CPP']='gcc -E'
but, inside the build CPP='cpp'.
So, my first question is - does Spack define a CPP that may be overwriting my CPP, or, if not, how to change Spack's default CPP?
Second, I figure one could also set these environment variables from the command line like
CPP="gcc -E" spack install ....
would that be something you'd suggest instead? What makes me wary of this is that I'd prefer to use whatever CPP is default for the main QE build (since it works), and only redefine CPP for the Yambo build that's done after the main QE.
Thanks,
MC