Skip to content

Commit dacd334

Browse files
authored
Add custom MASA (#315)
* Add custom MASA. * Inherit class.
1 parent 17949b2 commit dacd334

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2022, National Technology & Engineering Solutions of Sandia,
2+
# LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
3+
# Government retains certain rights in this software.
4+
#
5+
# This software is released under the BSD 3-clause license. See LICENSE file
6+
# for more details.
7+
8+
from spack_repo.builtin.packages.masa.package import Masa as bMasa
9+
from spack.package import *
10+
11+
class Masa(bMasa):
12+
def configure_args(self):
13+
options = super(Masa, self).configure_args()
14+
return options
15+
16+
def setup_build_environment(self, env: EnvironmentModifications) -> None:
17+
super().setup_build_environment(env)
18+
# Unfortunately can't use this because MASA overwrites it
19+
# env.set('CXXFLAGS', self.compiler.cxx11_flag)
20+
env.set("CXX", "{0} {1}".format(self.compiler.cxx, self.compiler.cxx11_flag))
21+
if self.spec.satisfies("%apple-clang"):
22+
env.set("CXX", "{0} {1} {2}".format(self.compiler.cxx, self.compiler.cxx11_flag, "-lstdc++"))
23+
env.set("CFLAGS", "-Wno-implicit-function-declaration")

0 commit comments

Comments
 (0)