hdf5: Clean up building self-tests (#3483)
* hdf5: Clean up building self-tests * hdf5: Clean up running self-tests
This commit is contained in:
parent
4866b4592f
commit
a0ab3c2523
@ -196,16 +196,12 @@ def check_install(self):
|
||||
with open("check.c", 'w') as f:
|
||||
f.write(source)
|
||||
if '+mpi' in spec:
|
||||
cc = which('%s' % spec['mpi'].mpicc)
|
||||
cc = Executable(spec['mpi'].mpicc)
|
||||
else:
|
||||
cc = which('cc')
|
||||
# TODO: Automate these path and library settings
|
||||
cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c")
|
||||
cc('-o', "check", "check.o",
|
||||
"-L%s" % join_path(spec.prefix, "lib"),
|
||||
"-L%s" % join_path(spec.prefix, "lib64"),
|
||||
"-lhdf5",
|
||||
"-lz")
|
||||
cc = Executable(self.compiler.cc)
|
||||
cc(*(['-c', "check.c"] + spec['hdf5'].cppflags.split()))
|
||||
cc(*(['-o', "check", "check.o"] +
|
||||
spec['hdf5'].libs.ld_flags.split()))
|
||||
try:
|
||||
check = Executable('./check')
|
||||
output = check(return_output=True)
|
||||
|
Loading…
Reference in New Issue
Block a user