Skip to content
Snippets Groups Projects
Commit 14760e2c authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Update dwd-icon-tools.

parent b93d84f3
No related branches found
No related tags found
1 merge request!9Build only
......@@ -56,13 +56,23 @@ class DwdIconTools(Package):
git("submodule", "update", "--init", "--recursive")
def setup_build_environment(self, env):
spec = self.spec
# Some environment variables to set
env_variables_to_set = {
"CXXFLAGS": "-O2 -g -fopenmp -Wunused -DNOMPI",
"FCFLAGS": "-I/usr/include --std=f2008 -O2 -g -cpp -fopenmp -fbounds-check -Wunused -DNOMPI",
if self.spec.satisfies("%gcc"):
env_variables_to_set = {
"CXXFLAGS": "-O2 -g -fopenmp -Wunused -DNOMPI",
"FCFLAGS": "-I/usr/include --std=f2008 -O2 -g -cpp -fopenmp -fbounds-check -Wunused -DNOMPI",
"LIBS": f"-leccodes -lgfortran -lhdf5 -lxml2",
}
elif self.spec.satisfies("%intel"):
# Intel
env_variables_to_set = {
"CXXFLAGS": "-O2 -g -qopenmp -Wunused -DNOMPI",
"FCFLAGS": "-I/usr/include -stand f08 -O2 -g -fpp -qopenmp -check bounds -Wunused -DNOMPI",
"LIBS": f"-leccodes -lgfortran -lhdf5 -lxml2",
}
}
else:
raise AssertionError("Compiler does not match gcc nor intel")
for variable, value in env_variables_to_set.items():
env.set(variable, value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment